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 <ds...@hortonworks.com> on 2014/06/24 16:17:16 UTC
Review Request 22933: Usability: Ambari-server may fail to start Postgres
with a cryptic message
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22933/
-----------------------------------------------------------
Review request for Ambari and Dmitro Lisnichenko.
Bugs: AMBARI-6254
https://issues.apache.org/jira/browse/AMBARI-6254
Repository: ambari
Description
-------
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
Diffs
-----
ambari-server/sbin/ambari-server 0610657
ambari-server/src/main/python/ambari-server.py 20ccba2
ambari-server/src/test/python/TestAmbariServer.py 4d4816d
Diff: https://reviews.apache.org/r/22933/diff/
Testing
-------
Thanks,
Dmytro Sen
Re: Review Request 22933: Usability: Ambari-server may fail to start
Postgres with a cryptic message
Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22933/#review46526
-----------------------------------------------------------
Ship it!
Ship It!
- Dmitro Lisnichenko
On June 24, 2014, 2:17 p.m., Dmytro Sen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22933/
> -----------------------------------------------------------
>
> (Updated June 24, 2014, 2:17 p.m.)
>
>
> Review request for Ambari and Dmitro Lisnichenko.
>
>
> Bugs: AMBARI-6254
> https://issues.apache.org/jira/browse/AMBARI-6254
>
>
> Repository: ambari
>
>
> Description
> -------
>
> 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
>
>
> Diffs
> -----
>
> ambari-server/sbin/ambari-server 0610657
> ambari-server/src/main/python/ambari-server.py 20ccba2
> ambari-server/src/test/python/TestAmbariServer.py 4d4816d
>
> Diff: https://reviews.apache.org/r/22933/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dmytro Sen
>
>
Re: Review Request 22933: Usability: Ambari-server may fail to start
Postgres with a cryptic message
Posted by Dmytro Sen <ds...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22933/
-----------------------------------------------------------
(Updated June 24, 2014, 5:33 p.m.)
Review request for Ambari and Dmitro Lisnichenko.
Bugs: AMBARI-6254
https://issues.apache.org/jira/browse/AMBARI-6254
Repository: ambari
Description
-------
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
Diffs
-----
ambari-server/sbin/ambari-server 0610657
ambari-server/src/main/python/ambari-server.py 20ccba2
ambari-server/src/test/python/TestAmbariServer.py 4d4816d
Diff: https://reviews.apache.org/r/22933/diff/
Testing (updated)
-------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [1.632s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.303s]
[INFO] Ambari Web ........................................ SUCCESS [22.921s]
[INFO] Ambari Views ...................................... SUCCESS [1.546s]
[INFO] Ambari Server ..................................... SUCCESS [14:21.956s]
[INFO] Ambari Agent ...................................... SUCCESS [6.150s]
[INFO] Ambari Client ..................................... SUCCESS [0.035s]
[INFO] Ambari Python Client .............................. SUCCESS [0.291s]
[INFO] Ambari Groovy Client .............................. SUCCESS [8.195s]
[INFO] Ambari Shell ...................................... SUCCESS [4.434s]
Thanks,
Dmytro Sen