Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Unable to start ambari server as non root user after fresh installation

avatar
Contributor

Not able to start ambari server as non root user (ambari) after fresh installation.

[ambari@ambari ~]$ ambari-server start

Using python /usr/bin/python2.6

Starting ambari-server

Organizing resource files at /var/lib/ambari-server/resources...

Unable to check firewall status when starting without root privileges.

Please do not forget to disable or adjust firewall if needed

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start....................

ERROR: Exiting with exit code -1.

REASON: Ambari Server java process died with exitcode 1. Check /var/log/ambari-server/ambari-server.out for more information.

As per log file the issue seems to be database connectivity, however, I am able to login to the database

[ambari@ambari ~]$ mysql -u ambari -p -h ambari.localdomain

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 114 Server version: 5.7.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates.Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select current_user();

+---------------------------+

| current_user() |

+---------------------------+

| ambari@ambari.localdomain |

+---------------------------+

1 row in set (0.00 sec)

Please advise.

1 ACCEPTED SOLUTION

avatar
Contributor

Thanks for the quick response. The issue was with the password in /etc/ambari-server/conf/password.dat file.

There are couple of follow up questions:

1) While setting up ambari server it didn't allowed me to enter any special character.

Enter Database Password (bigdata):

Invalid characters in password. Use only alphanumeric or _ or - characters

Enter Database Password (bigdata):

2) After successfully starting ambari server is ambari-server.log file is filling up with errors. As log file is continuously growing up with errors I am uploading the log file.

[ambari@ambari ~]$ ambari-server start

Using python /usr/bin/python2.6

Starting ambari-server

Organizing resource files at /var/lib/ambari-server/resources...

Unable to check firewall status when starting without root privileges.

Please do not forget to disable or adjust firewall if needed

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start....................

Ambari Server 'start' completed successfully.

3) Even after stopping ambari server I see that log file is filling up.

[ambari@ambari ~]$ ambari-server stop

Using python /usr/bin/python2.6

Stopping ambari-server

Ambari Server is not running

[ambari@ambari ~]$ ambari-server status

Using python /usr/bin/python2.6

Ambari-server status

Ambari Server not running.

Stale PID File at: /var/run/ambari-server/ambari-server.pid

[ambari@ambari ~]$ ps -ef|grep ambari

root 2223 1928 0 11:30 pts/1 00:00:00 su - ambari ambari 2224 2223 0 11:30 pts/1 00:00:00 -bash ambari 2735 1 0 12:02 pts/1 00:00:00 /bin/sh -c ulimit -n 10000 ; /usr/jdk64/jdk1.8.0_40/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar:/usr/share/java/mysql-connector-java-5.1.17.jar org.apache.ambari.server.controller.AmbariServer > /var/log/ambari-server/ambari-server.out 2>&1 || echo $? > /var/run/ambari-server/ambari-server.exitcode & ambari 2736 2735 28 12:02 pts/1 00:03:30 /usr/jdk64/jdk1.8.0_40/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar:/usr/share/java/mysql-connector-java-5.1.17.jar org.apache.ambari.server.controller.AmbariServer ambari 2899 2224 0 12:14 pts/1 00:00:00 ps -ef ambari 2900 2224 0 12:14 pts/1 00:00:00 grep ambari

Please advise.

Thank you,

Sachin A

View solution in original post

14 REPLIES 14

avatar

@Sachin Ambardekar

What does ambari-server.log and ambari-server.out log file says? can you paste the error?

avatar
Contributor

avatar

@Sachin Ambardekar

Make sure you have correct password for ambari db user in /etc/ambari-server/conf/password.dat

also make sure you run this query by connecting as root user. (I know you are able to connect from this host - but just redo to make sure)

grant all privileges on *.* to 'ambari'@'ambari.localdomain' identified by 'password' ;

avatar
Contributor

Thanks for the quick response. The issue was with the password in /etc/ambari-server/conf/password.dat file.

There are couple of follow up questions:

1) While setting up ambari server it didn't allowed me to enter any special character.

Enter Database Password (bigdata):

Invalid characters in password. Use only alphanumeric or _ or - characters

Enter Database Password (bigdata):

2) After successfully starting ambari server is ambari-server.log file is filling up with errors. As log file is continuously growing up with errors I am uploading the log file.

[ambari@ambari ~]$ ambari-server start

Using python /usr/bin/python2.6

Starting ambari-server

Organizing resource files at /var/lib/ambari-server/resources...

Unable to check firewall status when starting without root privileges.

Please do not forget to disable or adjust firewall if needed

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start....................

Ambari Server 'start' completed successfully.

3) Even after stopping ambari server I see that log file is filling up.

[ambari@ambari ~]$ ambari-server stop

Using python /usr/bin/python2.6

Stopping ambari-server

Ambari Server is not running

[ambari@ambari ~]$ ambari-server status

Using python /usr/bin/python2.6

Ambari-server status

Ambari Server not running.

Stale PID File at: /var/run/ambari-server/ambari-server.pid

[ambari@ambari ~]$ ps -ef|grep ambari

root 2223 1928 0 11:30 pts/1 00:00:00 su - ambari ambari 2224 2223 0 11:30 pts/1 00:00:00 -bash ambari 2735 1 0 12:02 pts/1 00:00:00 /bin/sh -c ulimit -n 10000 ; /usr/jdk64/jdk1.8.0_40/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar:/usr/share/java/mysql-connector-java-5.1.17.jar org.apache.ambari.server.controller.AmbariServer > /var/log/ambari-server/ambari-server.out 2>&1 || echo $? > /var/run/ambari-server/ambari-server.exitcode & ambari 2736 2735 28 12:02 pts/1 00:03:30 /usr/jdk64/jdk1.8.0_40/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar:/usr/share/java/mysql-connector-java-5.1.17.jar org.apache.ambari.server.controller.AmbariServer ambari 2899 2224 0 12:14 pts/1 00:00:00 ps -ef ambari 2900 2224 0 12:14 pts/1 00:00:00 grep ambari

Please advise.

Thank you,

Sachin A

avatar

1) While setting up ambari server it didn't allowed me to enter any special character.

Amar: Currently Ambari does not allow - however you can modify password.dat file with correct password.

2) After successfully starting ambari server is ambari-server.log file is filling up with errors. As log file is continuously growing up with errors I am uploading the log file.

Amar: what is the error?

3) Even after stopping ambari server I see that log file is filling up.

Amar: what is the Ambari version? in 2.4.0 there was a bug - some times "ambari-server stop" does not actually stop it.

avatar

found the logs attached.

i see error as "com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1 at sun.reflect.GeneratedConstructorAccessor106.newInstance(Unknown Source)"

upgrading your mysql jdbc java connection to latest version (5.1.40) will not show/print any error messages

avatar
Contributor

avatar
Contributor

Ambari version is 2.1

I have uploaded log file. Issue looks similar to what mentioned in below link.

https://community.hortonworks.com/content/supportkb/48751/ambari-log-reports-you-have-an-error-in-yo...

What is the stable mysql-connector-java.jar version? As per the link

Note: Connector version 5.1.37 has been observed to have issues with some of the Batch operations in Ambari.

Please advise,

Thank you,

Sachin A

avatar
@Sachin Ambardekar

2.1 is very old version, you can go with 2.4.2 version which is the latest one. don't remember seeing any errors with 5.1.37 but you can try with 5.1.40