How to resolve this issue. please tell me step by step process
Created 08-19-2019 02:22 AM
Can you please let us know where exactly do you see that message? The error message is very generic
ERROR: Exiting with exit code -1. REASON: Ambari Server java process has stopped. Please check the logs for more information
- Hence, can you please share the whole ambari-server.log . / amabri-server.out file?
- How frequently do you see this error?
- Do you see any port conflict on ambari server listen port (is that port free?)
- Are you running ambari server as non root user?
- Have you checked the permission of ambari log "/var/log/ambari-server" and run directory "/var/run/ambari-server" ?
- If your ambari server database running fine and accessible without any issue?
Created 08-19-2019 03:05 AM
- Hence, can you please share the whole ambari-server.log . / amabri-server.out file? : long files cant share. can you send your personal email id we can talk over there
- How frequently do you see this error? when ever i start ambari server its getting this message
- Do you see any port conflict on ambari server listen port (is that port free?): dont know hoe to check
- Are you running ambari server as non root user? : no i am running on root
- Have you checked the permission of ambari log "/var/log/ambari-server" and run directory : "/var/run/ambari-server" ?: dont know how to check
- If your ambari server database running fine and accessible without any issue?: dont know how to check
Created 08-19-2019 07:05 AM
@Manoj690
Looks like there is another post from your side on similar issue. If you are noticing the DB errors in amb ari-server.log then please refer to: https://community.cloudera.com/t5/Support-Questions/ambari-server-status/m-p/268201
It will be really great if you can share some more lines from the ambari-server.log specially the "Caused By" section of the error. Check if you can attach the log here.
There can be various reasons behind the mentioned database error like ambari might not be able to connect to DB host/port. (firewall issue)
The DB credentials might be wrong.
DB might not be running ...
Based on the DB type (MySQL/ Postgres/ Oracle) we can use some standalone client utility OR ambari utility to test the connectivity and DB credentials from ambari server host.
Example: If Ambari DB is MySQL
/usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://dbhost.example.com:3306/ambari" "ambari" "bigdata" com.mysql.jdbc.Driver
Example: If Ambari DB is Postgres
/usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/lib/ambari-server/postgresql-9.3-1101-jdbc4.jar org.apache.ambari.server.DBConnectionVerification "jdbc:postgresql://dbhost.example.com:5432/ambari" "ambari" "bigdata" org.postgresql.Driver
You can find your ambari DB details from the following command. In the above command i am using default dummy credentials and URL you will need to find the values for DB url/credentials...etc based on your config, Driver JAR path...etc
# grep 'jdbc' /etc/ambari-server/conf/ambari.properties
.
Created 08-19-2019 10:40 PM
when i used below command it will give this result
grep 'jdbc' /etc/ambari-server/conf/ambari.properties
custom.mysql.jdbc.name=mysql-connector-java.jar
previous.custom.mysql.jdbc.name=mysql-connector-java.jar
server.jdbc.connection-pool=c3p0
server.jdbc.connection-pool.acquisition-size=5
server.jdbc.connection-pool.idle-test-interval=7200
server.jdbc.connection-pool.max-age=0
server.jdbc.connection-pool.max-idle-time=14400
server.jdbc.connection-pool.max-idle-time-excess=0
server.jdbc.database=mysql
server.jdbc.database_name=hive
server.jdbc.driver=com.mysql.jdbc.Driver
server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar
server.jdbc.hostname=gaian-lap386.com
server.jdbc.port=8080
server.jdbc.rca.driver=com.mysql.jdbc.Driver
server.jdbc.rca.url=jdbc:mysql://gaian-lap386.com:8080/hive
server.jdbc.rca.user.name=hive
server.jdbc.rca.user.passwd=/etc/ambari-server/conf/password.dat
server.jdbc.url=jdbc:mysql://gaian-lap386.com:8080/hive
server.jdbc.user.name=hive
server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
AND
tail -10f /var/log/ambari-server/ambari-server.log
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
... 20 more
Created 08-21-2019 02:10 AM
@Manoj690
If Ambari Server is up and running now then can you mark this thread as closed.
The other threads regarding MySQL + Ambari connectivity are here:
https://community.cloudera.com/t5/Support-Questions/ambari-server-problem-3/m-p/268500/highlight/fal...
https://community.cloudera.com/t5/Support-Questions/ambari-server-problem-2/m-p/268487#M206225