You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Myroslav Papirkovskyi (JIRA)" <ji...@apache.org> on 2017/10/03 14:56:00 UTC

[jira] [Created] (AMBARI-22122) ambari server silent setup for embedded database option fails sometime

Myroslav Papirkovskyi created AMBARI-22122:
----------------------------------------------

             Summary: ambari server silent setup for embedded database option fails sometime
                 Key: AMBARI-22122
                 URL: https://issues.apache.org/jira/browse/AMBARI-22122
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.6.0
            Reporter: Myroslav Papirkovskyi
            Assignee: Myroslav Papirkovskyi
            Priority: Blocker
             Fix For: 2.6.0


ambari-server setup -s being run as root

{code:title=console output for first time}
Enter advanced database configuration [y/n] (n)? 
Configuring database...
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take up to a minute.
Initializing database: [  OK  ]

About to start PostgreSQL
Configuring local database...
Configuring PostgreSQL...
Creating schema and user...
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"']
ERROR: stderr:could not change directory to "/root"
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

ERROR: stdout:
failed to execute queries ...retrying (1)
Creating schema and user...
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"']
ERROR: stderr:could not change directory to "/root"
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

ERROR: stdout:
failed to execute queries ...retrying (2)
Creating schema and user...
ERROR: Exiting with exit code 2. 
REASON: Running database init script failed. Exiting.
{code}


{code:title=console output when tried after first failure}
ambari-server setup -s
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
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)? 
Adjusting ambari-server permissions and ownership...
Checking firewall status...
WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
OK to continue [y/n] (y)? 
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? 
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? 
Configuring database...
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take up to a minute.
About to start PostgreSQL
ERROR: Exiting with exit code 1. 
REASON: Unable to start PostgreSQL server. Exiting

{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)