You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Andrew Onischuk <ao...@hortonworks.com> on 2017/05/24 10:09:13 UTC

Review Request 59522: ambari-server setup fails with default postgres

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

Review request for Ambari and Sid Wagle.


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


Repository: ambari


Description
-------

Thisis the first run with oracle12. Initially infra sets up Ambari with
default postgres and later on ambari setup happens with Oracle12. But now the
first setup with default postgres is failing with below error

    
    
    
    root@172.27.24.11 "ambari-server setup --java-home=/base/tools/jdk1.8.0_112 -s"
    2017-05-22 10:57:54.032 Using python  /usr/bin/python
    2017-05-22 10:57:54.032 Setup ambari-server
    2017-05-22 10:58:14.299 Checking SELinux...
    2017-05-22 10:58:14.299 SELinux status is 'disabled'
    2017-05-22 10:58:14.299 Customize user account for ambari-server daemon [y/n] (n)? 
    2017-05-22 10:58:14.299 Adjusting ambari-server permissions and ownership...
    2017-05-22 10:58:14.299 Checking firewall status...
    2017-05-22 10:58:14.299 FATAL: Could not load /lib/modules/3.10.0-327.13.1.el7.x86_64/modules.dep: No such file or directory
    2017-05-22 10:58:14.299 iptables v1.4.7: can't initialize iptables table `nat': Permission denied (you must be root)
    2017-05-22 10:58:14.299 Perhaps iptables or your kernel needs to be upgraded.
    2017-05-22 10:58:14.299 FATAL: Could not load /lib/modules/3.10.0-327.13.1.el7.x86_64/modules.dep: No such file or directory
    2017-05-22 10:58:14.299 iptables v1.4.7: can't initialize iptables table `filter': Permission denied (you must be root)
    2017-05-22 10:58:14.299 Perhaps iptables or your kernel needs to be upgraded.
    2017-05-22 10:58:14.299 WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
    2017-05-22 10:58:14.299 OK to continue [y/n] (y)? 
    2017-05-22 10:58:14.299 Checking JDK...
    2017-05-22 10:58:14.299 WARNING: JAVA_HOME /base/tools/jdk1.8.0_112 must be valid on ALL hosts
    2017-05-22 10:58:14.299 WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
    2017-05-22 10:58:14.299 Completing setup...
    2017-05-22 10:58:14.299 Configuring database...
    2017-05-22 10:58:14.299 Enter advanced database configuration [y/n] (n)? 
    2017-05-22 10:58:14.299 Configuring database...
    2017-05-22 10:58:14.299 Default properties detected. Using built-in database.
    2017-05-22 10:58:14.299 Configuring ambari database...
    2017-05-22 10:58:14.299 Checking PostgreSQL...
    2017-05-22 10:58:14.299 Running initdb: This may take up to a minute.
    2017-05-22 10:58:14.299 Initializing database: [  OK  ]
    2017-05-22 10:58:14.299 
    2017-05-22 10:58:14.299 About to start PostgreSQL
    2017-05-22 10:58:14.299 Configuring local database...
    2017-05-22 10:58:14.299 Configuring PostgreSQL...
    2017-05-22 10:58:14.299 Creating schema and user...
    2017-05-22 10:58:14.299 ERROR: Failed to execute command:['ambari-sudo.sh', 'su', 'postgres', '-', '--command=psql -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql -v username=\'"ambari"\' -v password="\'bigdata\'" -v dbname="ambari"']
    2017-05-22 10:58:14.299 ERROR: stderr:could not change directory to "/root"
    2017-05-22 10:58:14.299 psql: could not connect to server: No such file or directory
    2017-05-22 10:58:14.299 	Is the server running locally and accepting
    2017-05-22 10:58:14.299 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
    2017-05-22 10:58:14.299 
    2017-05-22 10:58:14.299 ERROR: stdout:
    2017-05-22 10:58:14.299 failed to execute queries ...retrying (1)
    2017-05-22 10:58:14.299 Creating schema and user...
    2017-05-22 10:58:14.299 ERROR: Failed to execute command:['ambari-sudo.sh', 'su', 'postgres', '-', '--command=psql -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql -v username=\'"ambari"\' -v password="\'bigdata\'" -v dbname="ambari"']
    2017-05-22 10:58:14.299 ERROR: stderr:could not change directory to "/root"
    2017-05-22 10:58:14.299 psql: could not connect to server: No such file or directory
    2017-05-22 10:58:14.299 	Is the server running locally and accepting
    2017-05-22 10:58:14.299 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
    2017-05-22 10:58:14.299 
    2017-05-22 10:58:14.299 ERROR: stdout:
    2017-05-22 10:58:14.299 failed to execute queries ...retrying (2)
    2017-05-22 10:58:14.299 Creating schema and user...
    2017-05-22 10:58:14.299 ERROR: Exiting with exit code 2. 
    2017-05-22 10:58:14.299 REASON: Running database init script failed. Exiting.
    2017-05-22 10:58:14.353 Set skip.service.checks=true ambari properties file on the Server host
    2017-05-22 10:58:14.353 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q -i /grid/0/jenkins/workspace/Run-Ambari-Setup@4/ycloud/ycloud.pem root@172.27.24.11 "sed -i 's/skip.service.checks=false/skip.service.checks=true/' /etc/ambari-server/conf/ambari.properties"
    2017-05-22 10:58:14.454 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q -i /grid/0/jenkins/workspace/Run-Ambari-Setup@4/ycloud/ycloud.pem root@172.27.24.11 "export AMBARI_JVM_ARGS='-Xms512m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m'; ambari-server start --debug" &
    2017-05-22 10:58:14.562 Using python  /usr/bin/python
    2017-05-22 10:58:14.562 Starting ambari-server
    2017-05-22 10:58:15.058 ERROR: Exiting with exit code 1. 
    2017-05-22 10:58:15.058 REASON: Unable to detect a system user for Ambari Server.
    2017-05-22 10:58:15.058 - If this is a new setup, then run the "ambari-server setup" command to create the user
    2017-05-22 10:58:15.058 - If this is an upgrade of an existing setup, run the "ambari-server upgrade" command.
    2017-05-22 10:58:15.058 Refer to the Ambari documentation for more information on setup and upgrade.
    2017-05-22 10:58:39.459 cmd
    

This run had gone through without any issues on the same environment
configuration during Fenton. It would be great if someone could help take a
look to see why is it failing now.  
Checked with [Siddharth
Wagle], and
retrying after few minutes went fine.


Diffs
-----

  ambari-common/src/main/python/ambari_commons/inet_utils.py 66f6544 
  ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py 797466d 


Diff: https://reviews.apache.org/r/59522/diff/1/


Testing
-------

mvn clean test


Thanks,

Andrew Onischuk


Re: Review Request 59522: ambari-server setup fails with default postgres

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59522/#review175958
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
Lines 63 (patched)
<https://reviews.apache.org/r/59522/#comment249300>

    Why not make this 1 second sleep and 30 tries?


- Sid Wagle


On May 24, 2017, 10:09 a.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59522/
> -----------------------------------------------------------
> 
> (Updated May 24, 2017, 10:09 a.m.)
> 
> 
> Review request for Ambari and Sid Wagle.
> 
> 
> Bugs: AMBARI-21110
>     https://issues.apache.org/jira/browse/AMBARI-21110
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Thisis the first run with oracle12. Initially infra sets up Ambari with
> default postgres and later on ambari setup happens with Oracle12. But now the
> first setup with default postgres is failing with below error
> 
>     
>     
>     
>     root@172.27.24.11 "ambari-server setup --java-home=/base/tools/jdk1.8.0_112 -s"
>     2017-05-22 10:57:54.032 Using python  /usr/bin/python
>     2017-05-22 10:57:54.032 Setup ambari-server
>     2017-05-22 10:58:14.299 Checking SELinux...
>     2017-05-22 10:58:14.299 SELinux status is 'disabled'
>     2017-05-22 10:58:14.299 Customize user account for ambari-server daemon [y/n] (n)? 
>     2017-05-22 10:58:14.299 Adjusting ambari-server permissions and ownership...
>     2017-05-22 10:58:14.299 Checking firewall status...
>     2017-05-22 10:58:14.299 FATAL: Could not load /lib/modules/3.10.0-327.13.1.el7.x86_64/modules.dep: No such file or directory
>     2017-05-22 10:58:14.299 iptables v1.4.7: can't initialize iptables table `nat': Permission denied (you must be root)
>     2017-05-22 10:58:14.299 Perhaps iptables or your kernel needs to be upgraded.
>     2017-05-22 10:58:14.299 FATAL: Could not load /lib/modules/3.10.0-327.13.1.el7.x86_64/modules.dep: No such file or directory
>     2017-05-22 10:58:14.299 iptables v1.4.7: can't initialize iptables table `filter': Permission denied (you must be root)
>     2017-05-22 10:58:14.299 Perhaps iptables or your kernel needs to be upgraded.
>     2017-05-22 10:58:14.299 WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
>     2017-05-22 10:58:14.299 OK to continue [y/n] (y)? 
>     2017-05-22 10:58:14.299 Checking JDK...
>     2017-05-22 10:58:14.299 WARNING: JAVA_HOME /base/tools/jdk1.8.0_112 must be valid on ALL hosts
>     2017-05-22 10:58:14.299 WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
>     2017-05-22 10:58:14.299 Completing setup...
>     2017-05-22 10:58:14.299 Configuring database...
>     2017-05-22 10:58:14.299 Enter advanced database configuration [y/n] (n)? 
>     2017-05-22 10:58:14.299 Configuring database...
>     2017-05-22 10:58:14.299 Default properties detected. Using built-in database.
>     2017-05-22 10:58:14.299 Configuring ambari database...
>     2017-05-22 10:58:14.299 Checking PostgreSQL...
>     2017-05-22 10:58:14.299 Running initdb: This may take up to a minute.
>     2017-05-22 10:58:14.299 Initializing database: [  OK  ]
>     2017-05-22 10:58:14.299 
>     2017-05-22 10:58:14.299 About to start PostgreSQL
>     2017-05-22 10:58:14.299 Configuring local database...
>     2017-05-22 10:58:14.299 Configuring PostgreSQL...
>     2017-05-22 10:58:14.299 Creating schema and user...
>     2017-05-22 10:58:14.299 ERROR: Failed to execute command:['ambari-sudo.sh', 'su', 'postgres', '-', '--command=psql -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql -v username=\'"ambari"\' -v password="\'bigdata\'" -v dbname="ambari"']
>     2017-05-22 10:58:14.299 ERROR: stderr:could not change directory to "/root"
>     2017-05-22 10:58:14.299 psql: could not connect to server: No such file or directory
>     2017-05-22 10:58:14.299 	Is the server running locally and accepting
>     2017-05-22 10:58:14.299 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>     2017-05-22 10:58:14.299 
>     2017-05-22 10:58:14.299 ERROR: stdout:
>     2017-05-22 10:58:14.299 failed to execute queries ...retrying (1)
>     2017-05-22 10:58:14.299 Creating schema and user...
>     2017-05-22 10:58:14.299 ERROR: Failed to execute command:['ambari-sudo.sh', 'su', 'postgres', '-', '--command=psql -f /var/lib/ambari-server/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql -v username=\'"ambari"\' -v password="\'bigdata\'" -v dbname="ambari"']
>     2017-05-22 10:58:14.299 ERROR: stderr:could not change directory to "/root"
>     2017-05-22 10:58:14.299 psql: could not connect to server: No such file or directory
>     2017-05-22 10:58:14.299 	Is the server running locally and accepting
>     2017-05-22 10:58:14.299 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>     2017-05-22 10:58:14.299 
>     2017-05-22 10:58:14.299 ERROR: stdout:
>     2017-05-22 10:58:14.299 failed to execute queries ...retrying (2)
>     2017-05-22 10:58:14.299 Creating schema and user...
>     2017-05-22 10:58:14.299 ERROR: Exiting with exit code 2. 
>     2017-05-22 10:58:14.299 REASON: Running database init script failed. Exiting.
>     2017-05-22 10:58:14.353 Set skip.service.checks=true ambari properties file on the Server host
>     2017-05-22 10:58:14.353 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q -i /grid/0/jenkins/workspace/Run-Ambari-Setup@4/ycloud/ycloud.pem root@172.27.24.11 "sed -i 's/skip.service.checks=false/skip.service.checks=true/' /etc/ambari-server/conf/ambari.properties"
>     2017-05-22 10:58:14.454 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q -i /grid/0/jenkins/workspace/Run-Ambari-Setup@4/ycloud/ycloud.pem root@172.27.24.11 "export AMBARI_JVM_ARGS='-Xms512m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=1024m'; ambari-server start --debug" &
>     2017-05-22 10:58:14.562 Using python  /usr/bin/python
>     2017-05-22 10:58:14.562 Starting ambari-server
>     2017-05-22 10:58:15.058 ERROR: Exiting with exit code 1. 
>     2017-05-22 10:58:15.058 REASON: Unable to detect a system user for Ambari Server.
>     2017-05-22 10:58:15.058 - If this is a new setup, then run the "ambari-server setup" command to create the user
>     2017-05-22 10:58:15.058 - If this is an upgrade of an existing setup, run the "ambari-server upgrade" command.
>     2017-05-22 10:58:15.058 Refer to the Ambari documentation for more information on setup and upgrade.
>     2017-05-22 10:58:39.459 cmd
>     
> 
> This run had gone through without any issues on the same environment
> configuration during Fenton. It would be great if someone could help take a
> look to see why is it failing now.  
> Checked with [Siddharth
> Wagle], and
> retrying after few minutes went fine.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/ambari_commons/inet_utils.py 66f6544 
>   ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py 797466d 
> 
> 
> Diff: https://reviews.apache.org/r/59522/diff/1/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>