You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Dmytro Sen (JIRA)" <ji...@apache.org> on 2014/06/24 19:37:24 UTC
[jira] [Resolved] (AMBARI-6254) Usability: Ambari-server may fail
to start Postgres with a cryptic message
[ https://issues.apache.org/jira/browse/AMBARI-6254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmytro Sen resolved AMBARI-6254.
--------------------------------
Resolution: Fixed
Committed to trunk
> Usability: Ambari-server may fail to start Postgres with a cryptic message
> --------------------------------------------------------------------------
>
> Key: AMBARI-6254
> URL: https://issues.apache.org/jira/browse/AMBARI-6254
> Project: Ambari
> Issue Type: Improvement
> Components: controller
> Affects Versions: 1.6.0
> Reporter: Dmytro Sen
> Assignee: Dmytro Sen
> Fix For: 1.7.0
>
>
> I'm using Centos 5.8 vagrant image. By default, $PATH looks like /usr/bin:/bin .
> ambari-server setup fails to start with :
> {code}
> [root@c5801 vagrant]# /etc/init.d/ambari-server setup -s -v
> Using python /usr/bin/python2.6
> Setup ambari-server
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Checking SELinux...
> INFO: about to run command: /usr/sbin/sestatus
> SELinux status is 'enabled'
> SELinux mode is 'enforcing'
> Temporarily disabling SELinux
> INFO: about to run command: setenforce 0
> WARNING: Could not run /usr/sbin/sestatus: OK
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Ambari-server daemon is configured to run under user 'root'. Change this setting [y/n] (n)?
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Cleaning bootstrap directory (/var/run/ambari-server/bootstrap) contents...
> INFO: about to run command: rm -rf /var/run/ambari-server/bootstrap
> Adjusting ambari-server permissions and ownership...
> INFO: about to run command: chmod -R 644 /var/log/ambari-server
> INFO: about to run command: chown -R root /var/log/ambari-server
> INFO: about to run command: chmod 755 /var/log/ambari-server
> INFO: about to run command: chown root /var/log/ambari-server
> INFO: about to run command: chmod -R 644 /var/run/ambari-server
> INFO: about to run command: chown -R root /var/run/ambari-server
> INFO: about to run command: chmod 755 /var/run/ambari-server
> INFO: about to run command: chown root /var/run/ambari-server
> INFO: about to run command: chmod 755 /var/run/ambari-server/bootstrap
> INFO: about to run command: chown root /var/run/ambari-server/bootstrap
> INFO: about to run command: chmod 700 /var/lib/ambari-server/ambari-env.sh
> INFO: about to run command: chown root /var/lib/ambari-server/ambari-env.sh
> INFO: about to run command: chmod -R 600 /var/lib/ambari-server/keys
> INFO: about to run command: chown -R root /var/lib/ambari-server/keys
> INFO: about to run command: chmod 700 /var/lib/ambari-server/keys
> INFO: about to run command: chown root /var/lib/ambari-server/keys
> INFO: about to run command: chmod 700 /var/lib/ambari-server/keys/db
> INFO: about to run command: chown root /var/lib/ambari-server/keys/db
> INFO: about to run command: chmod 700 /var/lib/ambari-server/keys/db/newcerts
> INFO: about to run command: chown root /var/lib/ambari-server/keys/db/newcerts
> INFO: File /var/lib/ambari-server/keys/.ssh does not exist
> INFO: about to run command: chmod -R 755 /var/lib/ambari-server/resources/stacks/
> INFO: about to run command: chown -R root /var/lib/ambari-server/resources/stacks/
> INFO: about to run command: chmod -R 755 /var/lib/ambari-server/resources/custom_actions/
> INFO: about to run command: chown -R root /var/lib/ambari-server/resources/custom_actions/
> INFO: about to run command: chmod -R 644 /etc/ambari-server/conf
> INFO: about to run command: chown -R root /etc/ambari-server/conf
> INFO: about to run command: chmod 755 /etc/ambari-server/conf
> INFO: about to run command: chown root /etc/ambari-server/conf
> INFO: about to run command: chmod 640 /etc/ambari-server/conf/password.dat
> INFO: about to run command: chown root /etc/ambari-server/conf/password.dat
> Checking iptables...
> INFO: about to run command: /usr/bin/env service iptables status
> /usr/bin/env: service: No such file or directory
> Checking JDK...
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Do you want to change Oracle JDK [y/n] (n)?
> Completing setup...
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: os_type already setting in properties file
> Configuring database...
> Enter advanced database configuration [y/n] (n)?
> INFO: Using database options: postgres,localhost,5432,ambari,ambari,bigdata
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> Default properties detected. Using built-in database.
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: Adjusting filesystem permissions
> INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
> INFO: about to run command: chmod 660 /etc/ambari-server/conf/password.dat
> INFO: about to run command: chown root /etc/ambari-server/conf/password.dat
> Checking PostgreSQL...
> INFO: about to run command: /usr/bin/env service postgresql status
> Running initdb: This may take upto a minute.
> INFO: about to run command: /usr/bin/env service postgresql initdb
> About to start PostgreSQL
> ERROR: Exiting with exit code 127.
> REASON: Unable to start PostgreSQL server. Exiting
> {code}
> In fact PostgreSQL server is running (tried starting it manually)
> {code}
> [root@c5801 vagrant]# /usr/bin/env service postgresql status
> /usr/bin/env: service: No such file or directory
> {code}
> The problem is caused by a $PATH variable:
> {code}
> [root@c5801 vagrant]# export PATH="$PATH:/sbin/:/usr/sbin"
> {code}
> fixes that.
> We may check $PATH variable and show some warning when running ambari-server.py
--
This message was sent by Atlassian JIRA
(v6.2#6252)