Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
2.6.0
-
None
Description
ambari-server setup -s being run as root
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.
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