You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Andrew Onischuk <ao...@hortonworks.com> on 2014/10/28 18:56:43 UTC

Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/
-----------------------------------------------------------

Review request for Ambari and Dmitro Lisnichenko.


Bugs: AMBARI-8005
    https://issues.apache.org/jira/browse/AMBARI-8005


Repository: ambari


Description
-------

I cannot get run ambari-server to run with non-root daemon (i.e. during
ambari-server setup, i setup to run as a different user).

I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
like a regression.

This is the full set of steps to install + setup ambari-server (notice during
setup, I set the daemon to be ec2-user):

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
    The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
    RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
    [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    Resolving s3.amazonaws.com... 72.21.195.160
    Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 250 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 250         --.-K/s   in 0s      
    
    2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
    
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
    AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 107 M
    Installed size: 156 M
    Downloading Packages:
    (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            53 MB/s | 107 MB     00:02     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.7.0-126.noarch                               4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
    
    Installed:
      ambari-server.noarch 0:1.7.0-126                                              
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking firewall...
    Checking JDK...
    [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
    [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1):
    To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    JDK distribution size is 142376665 bytes
    jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? 
    Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Extracting system views...
    ..ambari-admin-1.7.0.126.jar
    
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    ................
    Ambari Server 'start' completed successfully.
    

The process does not start and the .out file has a lot of errors. Attaching
the 170 .out and .log

To compare, I did the exact same, using 1.6.1:

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
    The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
    RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
    [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
    --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
    Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
    Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 472 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 472         --.-K/s   in 0s      
    
    2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
    
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
    Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
    ambari-1.x                                               | 1.3 kB     00:00     
    ambari-1.x/primary                                       | 1.9 kB     00:00     
    ambari-1.x                                                                  5/5
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 45 M
    Installed size: 94 M
    Downloading Packages:
    (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            30 MB/s |  45 MB     00:01     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.6.1-98.noarch                                4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
      Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
    
    Installed:
      ambari-server.noarch 0:1.6.1-98                                               
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking iptables...
    Checking JDK...
    [1] - Oracle JDK 1.7
    [2] - Oracle JDK 1.6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1): 
    To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    JDK distribution size is 138094686 bytes
    
    jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Waiting for server start...
    sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Ambari Server 'start' completed successfully.
    

That server start fine. Attaching that .out and .log for reference.


Diffs
-----

  ambari-server/src/main/python/ambari-server.py a36bb77 
  ambari-server/src/test/python/TestAmbariServer.py 450b385 

Diff: https://reviews.apache.org/r/27294/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Dmytro Sen <ds...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/#review58838
-----------------------------------------------------------

Ship it!


Ship It!

- Dmytro Sen


On Окт. 28, 2014, 5:57 п.п., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27294/
> -----------------------------------------------------------
> 
> (Updated Окт. 28, 2014, 5:57 п.п.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Dmytro Sen.
> 
> 
> Bugs: AMBARI-8005
>     https://issues.apache.org/jira/browse/AMBARI-8005
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> I cannot get run ambari-server to run with non-root daemon (i.e. during
> ambari-server setup, i setup to run as a different user).
> 
> I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
> like a regression.
> 
> This is the full set of steps to install + setup ambari-server (notice during
> setup, I set the daemon to be ec2-user):
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
>     The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
>     RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     Resolving s3.amazonaws.com... 72.21.195.160
>     Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 250 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 250         --.-K/s   in 0s      
>     
>     2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
>     
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
>     AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 107 M
>     Installed size: 156 M
>     Downloading Packages:
>     (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            53 MB/s | 107 MB     00:02     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.7.0-126.noarch                               4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.7.0-126                                              
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking firewall...
>     Checking JDK...
>     [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
>     [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1):
>     To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     JDK distribution size is 142376665 bytes
>     jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? 
>     Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Extracting system views...
>     ..ambari-admin-1.7.0.126.jar
>     
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     ................
>     Ambari Server 'start' completed successfully.
>     
> 
> The process does not start and the .out file has a lot of errors. Attaching
> the 170 .out and .log
> 
> To compare, I did the exact same, using 1.6.1:
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
>     The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
>     RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
>     --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
>     Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
>     Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 472 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 472         --.-K/s   in 0s      
>     
>     2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
>     
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
>     Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
>     ambari-1.x                                               | 1.3 kB     00:00     
>     ambari-1.x/primary                                       | 1.9 kB     00:00     
>     ambari-1.x                                                                  5/5
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 45 M
>     Installed size: 94 M
>     Downloading Packages:
>     (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            30 MB/s |  45 MB     00:01     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.6.1-98.noarch                                4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
>       Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.6.1-98                                               
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking iptables...
>     Checking JDK...
>     [1] - Oracle JDK 1.7
>     [2] - Oracle JDK 1.6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1): 
>     To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     JDK distribution size is 138094686 bytes
>     
>     jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Waiting for server start...
>     sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Ambari Server 'start' completed successfully.
>     
> 
> That server start fine. Attaching that .out and .log for reference.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/python/ambari-server.py a36bb77 
>   ambari-server/src/test/python/TestAmbariServer.py 450b385 
> 
> Diff: https://reviews.apache.org/r/27294/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Vitalyi Brodetskyi <vb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/#review59199
-----------------------------------------------------------

Ship it!


Ship It!

- Vitalyi Brodetskyi


On Жов. 30, 2014, 2:39 після полудня, Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27294/
> -----------------------------------------------------------
> 
> (Updated Жов. 30, 2014, 2:39 після полудня)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-8005
>     https://issues.apache.org/jira/browse/AMBARI-8005
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> I cannot get run ambari-server to run with non-root daemon (i.e. during
> ambari-server setup, i setup to run as a different user).
> 
> I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
> like a regression.
> 
> This is the full set of steps to install + setup ambari-server (notice during
> setup, I set the daemon to be ec2-user):
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
>     The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
>     RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     Resolving s3.amazonaws.com... 72.21.195.160
>     Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 250 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 250         --.-K/s   in 0s      
>     
>     2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
>     
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
>     AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 107 M
>     Installed size: 156 M
>     Downloading Packages:
>     (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            53 MB/s | 107 MB     00:02     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.7.0-126.noarch                               4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.7.0-126                                              
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking firewall...
>     Checking JDK...
>     [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
>     [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1):
>     To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     JDK distribution size is 142376665 bytes
>     jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? 
>     Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Extracting system views...
>     ..ambari-admin-1.7.0.126.jar
>     
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     ................
>     Ambari Server 'start' completed successfully.
>     
> 
> The process does not start and the .out file has a lot of errors. Attaching
> the 170 .out and .log
> 
> To compare, I did the exact same, using 1.6.1:
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
>     The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
>     RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
>     --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
>     Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
>     Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 472 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 472         --.-K/s   in 0s      
>     
>     2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
>     
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
>     Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
>     ambari-1.x                                               | 1.3 kB     00:00     
>     ambari-1.x/primary                                       | 1.9 kB     00:00     
>     ambari-1.x                                                                  5/5
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 45 M
>     Installed size: 94 M
>     Downloading Packages:
>     (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            30 MB/s |  45 MB     00:01     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.6.1-98.noarch                                4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
>       Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.6.1-98                                               
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking iptables...
>     Checking JDK...
>     [1] - Oracle JDK 1.7
>     [2] - Oracle JDK 1.6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1): 
>     To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     JDK distribution size is 138094686 bytes
>     
>     jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Waiting for server start...
>     sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Ambari Server 'start' completed successfully.
>     
> 
> That server start fine. Attaching that .out and .log for reference.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/python/ambari-server.py ee5ed17 
> 
> Diff: https://reviews.apache.org/r/27294/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/
-----------------------------------------------------------

(Updated Oct. 30, 2014, 2:39 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Vitalyi Brodetskyi.


Bugs: AMBARI-8005
    https://issues.apache.org/jira/browse/AMBARI-8005


Repository: ambari


Description
-------

I cannot get run ambari-server to run with non-root daemon (i.e. during
ambari-server setup, i setup to run as a different user).

I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
like a regression.

This is the full set of steps to install + setup ambari-server (notice during
setup, I set the daemon to be ec2-user):

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
    The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
    RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
    [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    Resolving s3.amazonaws.com... 72.21.195.160
    Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 250 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 250         --.-K/s   in 0s      
    
    2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
    
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
    AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 107 M
    Installed size: 156 M
    Downloading Packages:
    (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            53 MB/s | 107 MB     00:02     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.7.0-126.noarch                               4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
    
    Installed:
      ambari-server.noarch 0:1.7.0-126                                              
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking firewall...
    Checking JDK...
    [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
    [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1):
    To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    JDK distribution size is 142376665 bytes
    jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? 
    Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Extracting system views...
    ..ambari-admin-1.7.0.126.jar
    
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    ................
    Ambari Server 'start' completed successfully.
    

The process does not start and the .out file has a lot of errors. Attaching
the 170 .out and .log

To compare, I did the exact same, using 1.6.1:

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
    The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
    RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
    [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
    --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
    Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
    Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 472 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 472         --.-K/s   in 0s      
    
    2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
    
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
    Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
    ambari-1.x                                               | 1.3 kB     00:00     
    ambari-1.x/primary                                       | 1.9 kB     00:00     
    ambari-1.x                                                                  5/5
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 45 M
    Installed size: 94 M
    Downloading Packages:
    (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            30 MB/s |  45 MB     00:01     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.6.1-98.noarch                                4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
      Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
    
    Installed:
      ambari-server.noarch 0:1.6.1-98                                               
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking iptables...
    Checking JDK...
    [1] - Oracle JDK 1.7
    [2] - Oracle JDK 1.6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1): 
    To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    JDK distribution size is 138094686 bytes
    
    jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Waiting for server start...
    sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Ambari Server 'start' completed successfully.
    

That server start fine. Attaching that .out and .log for reference.


Diffs
-----

  ambari-server/src/main/python/ambari-server.py ee5ed17 

Diff: https://reviews.apache.org/r/27294/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/#review59198
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On Oct. 30, 2014, 2:37 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27294/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2014, 2:37 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Dmytro Sen.
> 
> 
> Bugs: AMBARI-8005
>     https://issues.apache.org/jira/browse/AMBARI-8005
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> I cannot get run ambari-server to run with non-root daemon (i.e. during
> ambari-server setup, i setup to run as a different user).
> 
> I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
> like a regression.
> 
> This is the full set of steps to install + setup ambari-server (notice during
> setup, I set the daemon to be ec2-user):
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
>     The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
>     RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     Resolving s3.amazonaws.com... 72.21.195.160
>     Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 250 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 250         --.-K/s   in 0s      
>     
>     2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
>     
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
>     AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 107 M
>     Installed size: 156 M
>     Downloading Packages:
>     (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            53 MB/s | 107 MB     00:02     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.7.0-126.noarch                               4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.7.0-126                                              
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking firewall...
>     Checking JDK...
>     [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
>     [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1):
>     To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     JDK distribution size is 142376665 bytes
>     jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? 
>     Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Extracting system views...
>     ..ambari-admin-1.7.0.126.jar
>     
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     ................
>     Ambari Server 'start' completed successfully.
>     
> 
> The process does not start and the .out file has a lot of errors. Attaching
> the 170 .out and .log
> 
> To compare, I did the exact same, using 1.6.1:
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
>     The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
>     RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
>     --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
>     Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
>     Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 472 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 472         --.-K/s   in 0s      
>     
>     2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
>     
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
>     Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
>     ambari-1.x                                               | 1.3 kB     00:00     
>     ambari-1.x/primary                                       | 1.9 kB     00:00     
>     ambari-1.x                                                                  5/5
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 45 M
>     Installed size: 94 M
>     Downloading Packages:
>     (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            30 MB/s |  45 MB     00:01     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.6.1-98.noarch                                4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
>       Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.6.1-98                                               
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking iptables...
>     Checking JDK...
>     [1] - Oracle JDK 1.7
>     [2] - Oracle JDK 1.6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1): 
>     To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     JDK distribution size is 138094686 bytes
>     
>     jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Waiting for server start...
>     sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Ambari Server 'start' completed successfully.
>     
> 
> That server start fine. Attaching that .out and .log for reference.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/python/ambari-server.py ee5ed17 
> 
> Diff: https://reviews.apache.org/r/27294/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/
-----------------------------------------------------------

(Updated Oct. 30, 2014, 2:37 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Dmytro Sen.


Bugs: AMBARI-8005
    https://issues.apache.org/jira/browse/AMBARI-8005


Repository: ambari


Description
-------

I cannot get run ambari-server to run with non-root daemon (i.e. during
ambari-server setup, i setup to run as a different user).

I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
like a regression.

This is the full set of steps to install + setup ambari-server (notice during
setup, I set the daemon to be ec2-user):

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
    The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
    RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
    [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    Resolving s3.amazonaws.com... 72.21.195.160
    Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 250 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 250         --.-K/s   in 0s      
    
    2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
    
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
    AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 107 M
    Installed size: 156 M
    Downloading Packages:
    (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            53 MB/s | 107 MB     00:02     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.7.0-126.noarch                               4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
    
    Installed:
      ambari-server.noarch 0:1.7.0-126                                              
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking firewall...
    Checking JDK...
    [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
    [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1):
    To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    JDK distribution size is 142376665 bytes
    jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? 
    Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Extracting system views...
    ..ambari-admin-1.7.0.126.jar
    
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    ................
    Ambari Server 'start' completed successfully.
    

The process does not start and the .out file has a lot of errors. Attaching
the 170 .out and .log

To compare, I did the exact same, using 1.6.1:

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
    The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
    RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
    [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
    --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
    Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
    Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 472 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 472         --.-K/s   in 0s      
    
    2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
    
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
    Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
    ambari-1.x                                               | 1.3 kB     00:00     
    ambari-1.x/primary                                       | 1.9 kB     00:00     
    ambari-1.x                                                                  5/5
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 45 M
    Installed size: 94 M
    Downloading Packages:
    (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            30 MB/s |  45 MB     00:01     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.6.1-98.noarch                                4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
      Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
    
    Installed:
      ambari-server.noarch 0:1.6.1-98                                               
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking iptables...
    Checking JDK...
    [1] - Oracle JDK 1.7
    [2] - Oracle JDK 1.6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1): 
    To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    JDK distribution size is 138094686 bytes
    
    jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Waiting for server start...
    sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Ambari Server 'start' completed successfully.
    

That server start fine. Attaching that .out and .log for reference.


Diffs (updated)
-----

  ambari-server/src/main/python/ambari-server.py ee5ed17 

Diff: https://reviews.apache.org/r/27294/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/#review58840
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On Oct. 28, 2014, 5:57 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27294/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2014, 5:57 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Dmytro Sen.
> 
> 
> Bugs: AMBARI-8005
>     https://issues.apache.org/jira/browse/AMBARI-8005
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> I cannot get run ambari-server to run with non-root daemon (i.e. during
> ambari-server setup, i setup to run as a different user).
> 
> I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
> like a regression.
> 
> This is the full set of steps to install + setup ambari-server (notice during
> setup, I set the daemon to be ec2-user):
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
>     The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
>     RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
>     Resolving s3.amazonaws.com... 72.21.195.160
>     Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 250 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 250         --.-K/s   in 0s      
>     
>     2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
>     
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
>     AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 107 M
>     Installed size: 156 M
>     Downloading Packages:
>     (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            53 MB/s | 107 MB     00:02     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.7.0-126.noarch                               4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.7.0-126                                              
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking firewall...
>     Checking JDK...
>     [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
>     [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1):
>     To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     JDK distribution size is 142376665 bytes
>     jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? 
>     Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Extracting system views...
>     ..ambari-admin-1.7.0.126.jar
>     
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     ................
>     Ambari Server 'start' completed successfully.
>     
> 
> The process does not start and the .out file has a lot of errors. Attaching
> the 170 .out and .log
> 
> To compare, I did the exact same, using 1.6.1:
> 
>     
>     
>     
>     HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
>     The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
>     RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
>     Are you sure you want to continue connecting (yes/no)? yes
>     Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
>     [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
>     --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
>     Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
>     Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
>     HTTP request sent, awaiting response... 200 OK
>     Length: 472 [binary/octet-stream]
>     Saving to: “ambari.repo”
>     
>     100%[======================================>] 472         --.-K/s   in 0s      
>     
>     2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
>     
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
>     Loaded plugins: amazon-id, rhui-lb, security
>     Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
>     Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
>     ambari-1.x                                               | 1.3 kB     00:00     
>     ambari-1.x/primary                                       | 1.9 kB     00:00     
>     ambari-1.x                                                                  5/5
>     rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
>     rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
>     rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
>     rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
>     rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
>     rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
>     rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
>     rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
>     Setting up Install Process
>     Resolving Dependencies
>     --> Running transaction check
>     ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
>     --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
>     --> Running transaction check
>     ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
>     --> Running transaction check
>     ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
>     ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
>     --> Finished Dependency Resolution
>     
>     Dependencies Resolved
>     
>     ================================================================================
>      Package           Arch   Version        Repository                        Size
>     ================================================================================
>     Installing:
>      ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
>     Installing for dependencies:
>      postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
>      postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
>      postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
>     
>     Transaction Summary
>     ================================================================================
>     Install       4 Package(s)
>     
>     Total download size: 45 M
>     Installed size: 94 M
>     Downloading Packages:
>     (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
>     (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
>     (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
>     (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
>     --------------------------------------------------------------------------------
>     Total                                            30 MB/s |  45 MB     00:01     
>     warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
>     Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Importing GPG key 0x07513CAD:
>      Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
>      From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
>     Running rpm_check_debug
>     Running Transaction Test
>     Transaction Test Succeeded
>     Running Transaction
>       Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
>       Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
>       Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
>       Installing : ambari-server-1.6.1-98.noarch                                4/4 
>       Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
>       Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
>       Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
>       Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
>     
>     Installed:
>       ambari-server.noarch 0:1.6.1-98                                               
>     
>     Dependency Installed:
>       postgresql.x86_64 0:8.4.20-1.el6_5                                            
>       postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
>       postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
>     
>     Complete!
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
>     Using python  /usr/bin/python2.6
>     Setup ambari-server
>     Checking SELinux...
>     SELinux status is 'enabled'
>     SELinux mode is 'enforcing'
>     Temporarily disabling SELinux
>     WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
>     OK to continue [y/n] (y)? 
>     Customize user account for ambari-server daemon [y/n] (n)? y
>     Enter user account for ambari-server daemon (root):ec2-user
>     Adjusting ambari-server permissions and ownership...
>     Checking iptables...
>     Checking JDK...
>     [1] - Oracle JDK 1.7
>     [2] - Oracle JDK 1.6
>     [3] - Custom JDK
>     ==============================================================================
>     Enter choice (1): 
>     To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
>     Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
>     Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     JDK distribution size is 138094686 bytes
>     
>     jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
>     Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
>     Installing JDK to /usr/jdk64
>     Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
>     Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
>     Completing setup...
>     Configuring database...
>     Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
>     Checking PostgreSQL...
>     Running initdb: This may take upto a minute.
>     Initializing database: [  OK  ]
>     
>     About to start PostgreSQL
>     Configuring local database...
>     Connecting to local database...done.
>     Configuring PostgreSQL...
>     Restarting PostgreSQL
>     Ambari Server 'setup' completed successfully.
>     [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
>     Using python  /usr/bin/python2.6
>     Starting ambari-server
>     Ambari Server running with 'root' privileges.
>     Organizing resource files at /var/lib/ambari-server/resources...
>     Waiting for server start...
>     sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
>     Server PID at: /var/run/ambari-server/ambari-server.pid
>     Server out at: /var/log/ambari-server/ambari-server.out
>     Server log at: /var/log/ambari-server/ambari-server.log
>     Ambari Server 'start' completed successfully.
>     
> 
> That server start fine. Attaching that .out and .log for reference.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/python/ambari-server.py a36bb77 
>   ambari-server/src/test/python/TestAmbariServer.py 450b385 
> 
> Diff: https://reviews.apache.org/r/27294/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>


Re: Review Request 27294: Cannot get 1.7.0 to start with non-root daemon

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27294/
-----------------------------------------------------------

(Updated Oct. 28, 2014, 5:57 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Dmytro Sen.


Bugs: AMBARI-8005
    https://issues.apache.org/jira/browse/AMBARI-8005


Repository: ambari


Description
-------

I cannot get run ambari-server to run with non-root daemon (i.e. during
ambari-server setup, i setup to run as a different user).

I compared this with 1.7.0 and 1.6.1 and with 1.6.1, things work so this looks
like a regression.

This is the full set of steps to install + setup ambari-server (notice during
setup, I set the daemon to be ec2-user):

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-54-163-81-6.compute-1.amazonaws.com
    The authenticity of host 'ec2-54-163-81-6.compute-1.amazonaws.com (54.163.81.6)' can't be established.
    RSA key fingerprint is 06:49:d9:bc:3f:e2:b7:37:8c:d7:2a:56:0b:19:15:c3.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-54-163-81-6.compute-1.amazonaws.com,54.163.81.6' (RSA) to the list of known hosts.
    [ec2-user@ip-10-63-18-209 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo wget http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    --2014-10-26 20:28:25--  http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/1.x/latest/1.7.0/ambari.repo
    Resolving s3.amazonaws.com... 72.21.195.160
    Connecting to s3.amazonaws.com|72.21.195.160|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 250 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 250         --.-K/s   in 0s      
    
    2014-10-26 20:28:25 (25.1 MB/s) - “ambari.repo” saved [250/250]
    
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    AMBARI.1.7.0-1.x                                         | 2.9 kB     00:00     
    AMBARI.1.7.0-1.x/primary_db                              | 3.5 kB     00:00     
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.7.0-126 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.7.0-126.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.7.0-126      AMBARI.1.7.0-1.x                 101 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 107 M
    Installed size: 156 M
    Downloading Packages:
    (1/4): ambari-server-1.7.0-126.noarch.rpm                | 101 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            53 MB/s | 107 MB     00:02     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://s3.amazonaws.com/dev.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.7.0-126.noarch                               4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : ambari-server-1.7.0-126.noarch                               3/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             4/4 
    
    Installed:
      ambari-server.noarch 0:1.7.0-126                                              
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking firewall...
    Checking JDK...
    [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
    [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1):
    To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    JDK distribution size is 142376665 bytes
    jdk-7u67-linux-x64.tar.gz... 100% (135.8 MB of 135.8 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_67
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? 
    Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Extracting system views...
    ..ambari-admin-1.7.0.126.jar
    
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-63-18-209 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Waiting for server start....sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    ................
    Ambari Server 'start' completed successfully.
    

The process does not start and the .out file has a lot of errors. Attaching
the 170 .out and .log

To compare, I did the exact same, using 1.6.1:

    
    
    
    HW10505:dev jsposetti$ ssh -i mykeypair4.pem ec2-user@ec2-174-129-174-117.compute-1.amazonaws.com
    The authenticity of host 'ec2-174-129-174-117.compute-1.amazonaws.com (174.129.174.117)' can't be established.
    RSA key fingerprint is 0b:ca:0b:cb:40:b2:d2:ea:b7:9e:1e:1d:56:4f:47:97.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'ec2-174-129-174-117.compute-1.amazonaws.com,174.129.174.117' (RSA) to the list of known hosts.
    [ec2-user@ip-10-102-159-179 ~]$ cd /etc/yum.repos.d/
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo 
    --2014-10-26 20:29:29--  http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.1/ambari.repo
    Resolving public-repo-1.hortonworks.com... 54.192.101.121, 54.230.101.159, 54.230.101.244, ...
    Connecting to public-repo-1.hortonworks.com|54.192.101.121|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 472 [binary/octet-stream]
    Saving to: “ambari.repo”
    
    100%[======================================>] 472         --.-K/s   in 0s      
    
    2014-10-26 20:29:29 (46.9 MB/s) - “ambari.repo” saved [472/472]
    
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo yum install ambari-server -y
    Loaded plugins: amazon-id, rhui-lb, security
    Updates-ambari-1.6.1                                     | 2.9 kB     00:00     
    Updates-ambari-1.6.1/primary_db                          | 3.5 kB     00:00     
    ambari-1.x                                               | 1.3 kB     00:00     
    ambari-1.x/primary                                       | 1.9 kB     00:00     
    ambari-1.x                                                                  5/5
    rhui-REGION-client-config-server-6                       | 2.9 kB     00:00     
    rhui-REGION-client-config-server-6/primary_db            | 4.0 kB     00:00     
    rhui-REGION-rhel-server-releases                         | 3.7 kB     00:00     
    rhui-REGION-rhel-server-releases/primary_db              |  29 MB     00:00     
    rhui-REGION-rhel-server-releases-optional                | 3.5 kB     00:00     
    rhui-REGION-rhel-server-releases-optional/primary_db     | 3.0 MB     00:00     
    rhui-REGION-rhel-server-rh-common                        | 2.9 kB     00:00     
    rhui-REGION-rhel-server-rh-common/primary_db             |  35 kB     00:00     
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ambari-server.noarch 0:1.6.1-98 will be installed
    --> Processing Dependency: postgresql-server >= 8.1 for package: ambari-server-1.6.1-98.noarch
    --> Running transaction check
    ---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Processing Dependency: libpq.so.5()(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64
    --> Running transaction check
    ---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be installed
    ---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be installed
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package           Arch   Version        Repository                        Size
    ================================================================================
    Installing:
     ambari-server     noarch 1.6.1-98       Updates-ambari-1.6.1              39 M
    Installing for dependencies:
     postgresql        x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 2.6 M
     postgresql-libs   x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 201 k
     postgresql-server x86_64 8.4.20-1.el6_5 rhui-REGION-rhel-server-releases 3.4 M
    
    Transaction Summary
    ================================================================================
    Install       4 Package(s)
    
    Total download size: 45 M
    Installed size: 94 M
    Downloading Packages:
    (1/4): ambari-server-1.6.1-98.noarch.rpm                 |  39 MB     00:01     
    (2/4): postgresql-8.4.20-1.el6_5.x86_64.rpm              | 2.6 MB     00:00     
    (3/4): postgresql-libs-8.4.20-1.el6_5.x86_64.rpm         | 201 kB     00:00     
    (4/4): postgresql-server-8.4.20-1.el6_5.x86_64.rpm       | 3.4 MB     00:00     
    --------------------------------------------------------------------------------
    Total                                            30 MB/s |  45 MB     00:01     
    warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY
    Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Importing GPG key 0x07513CAD:
     Userid: "Jenkins (HDP Builds) <je...@hortonworks.com>"
     From  : http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : postgresql-libs-8.4.20-1.el6_5.x86_64                        1/4 
      Installing : postgresql-8.4.20-1.el6_5.x86_64                             2/4 
      Installing : postgresql-server-8.4.20-1.el6_5.x86_64                      3/4 
      Installing : ambari-server-1.6.1-98.noarch                                4/4 
      Verifying  : postgresql-server-8.4.20-1.el6_5.x86_64                      1/4 
      Verifying  : postgresql-libs-8.4.20-1.el6_5.x86_64                        2/4 
      Verifying  : postgresql-8.4.20-1.el6_5.x86_64                             3/4 
      Verifying  : ambari-server-1.6.1-98.noarch                                4/4 
    
    Installed:
      ambari-server.noarch 0:1.6.1-98                                               
    
    Dependency Installed:
      postgresql.x86_64 0:8.4.20-1.el6_5                                            
      postgresql-libs.x86_64 0:8.4.20-1.el6_5                                       
      postgresql-server.x86_64 0:8.4.20-1.el6_5                                     
    
    Complete!
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server setup
    Using python  /usr/bin/python2.6
    Setup ambari-server
    Checking SELinux...
    SELinux status is 'enabled'
    SELinux mode is 'enforcing'
    Temporarily disabling SELinux
    WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
    OK to continue [y/n] (y)? 
    Customize user account for ambari-server daemon [y/n] (n)? y
    Enter user account for ambari-server daemon (root):ec2-user
    Adjusting ambari-server permissions and ownership...
    Checking iptables...
    Checking JDK...
    [1] - Oracle JDK 1.7
    [2] - Oracle JDK 1.6
    [3] - Custom JDK
    ==============================================================================
    Enter choice (1): 
    To download the Oracle JDK you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup.
    Do you accept the Oracle Binary Code License Agreement [y/n] (y)? 
    Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u45-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    JDK distribution size is 138094686 bytes
    
    jdk-7u45-linux-x64.tar.gz... 100% (131.7 MB of 131.7 MB)
    Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-7u45-linux-x64.tar.gz
    Installing JDK to /usr/jdk64
    Successfully installed JDK to /usr/jdk64/jdk1.7.0_45
    Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
    Completing setup...
    Configuring database...
    Enter advanced database configuration [y/n] (n)? Default properties detected. Using built-in database.
    Checking PostgreSQL...
    Running initdb: This may take upto a minute.
    Initializing database: [  OK  ]
    
    About to start PostgreSQL
    Configuring local database...
    Connecting to local database...done.
    Configuring PostgreSQL...
    Restarting PostgreSQL
    Ambari Server 'setup' completed successfully.
    [ec2-user@ip-10-102-159-179 yum.repos.d]$ sudo ambari-server start
    Using python  /usr/bin/python2.6
    Starting ambari-server
    Ambari Server running with 'root' privileges.
    Organizing resource files at /var/lib/ambari-server/resources...
    Waiting for server start...
    sh: line 0: ulimit: open files: cannot modify limit: Operation not permitted
    Server PID at: /var/run/ambari-server/ambari-server.pid
    Server out at: /var/log/ambari-server/ambari-server.out
    Server log at: /var/log/ambari-server/ambari-server.log
    Ambari Server 'start' completed successfully.
    

That server start fine. Attaching that .out and .log for reference.


Diffs
-----

  ambari-server/src/main/python/ambari-server.py a36bb77 
  ambari-server/src/test/python/TestAmbariServer.py 450b385 

Diff: https://reviews.apache.org/r/27294/diff/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk