Created 03-17-2017 11:05 PM
While restarting ambari server after installing JCE, it fails to come up
This is what i see in ambari server logs
7 Mar 2017 17:53:03,666 ERROR [main] DBAccessorImpl:117 - If you are using a non-default database for Ambari and a custom JDBC driver jar, you need to set property "server.jdbc.driver.path={path/to/custom_jdbc_driver}" in ambari.properties config file, to include it in ambari-server classpath. java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.ambari.server.orm.DBAccessorImpl.<init>(DBAccessorImpl.java:89) at org.apache.ambari.server.orm.DBAccessorImpl$$FastClassByGuice$$86dbc63e.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
I see server.jdbc.driver.path missing in ambari.properties. I added it but still seeing this issue
Created 03-18-2017 12:21 AM
Do you have the following symlink present in the /usr/share/java directory to point to the mysql JDBC driver?
# ls -l /usr/share/java | grep mysql -rwxrwxrwx. 1 root root 992808 Mar 9 08:49 mysql-connector-java-5.1.41-bin.jar lrwxrwxrwx. 1 root root 35 Mar 9 08:50 mysql-connector-java.jar -> mysql-connector-java-5.1.41-bin.jar
.
If the mysql connector jar is not present there then please refer to then following link and then install the driver and create the symlink: http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-reference/content/using_ambari_wit...
Install the connector
# yum install mysql-connector-java
Confirm that .jar is in the Java share directory.
# ls /usr/share/java/mysql-connector-java.jar
Make sure the .jar file has the appropriatepermissions - 644.
Execute the following command:
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
Created 03-18-2017 12:21 AM
Do you have the following symlink present in the /usr/share/java directory to point to the mysql JDBC driver?
# ls -l /usr/share/java | grep mysql -rwxrwxrwx. 1 root root 992808 Mar 9 08:49 mysql-connector-java-5.1.41-bin.jar lrwxrwxrwx. 1 root root 35 Mar 9 08:50 mysql-connector-java.jar -> mysql-connector-java-5.1.41-bin.jar
.
If the mysql connector jar is not present there then please refer to then following link and then install the driver and create the symlink: http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-reference/content/using_ambari_wit...
Install the connector
# yum install mysql-connector-java
Confirm that .jar is in the Java share directory.
# ls /usr/share/java/mysql-connector-java.jar
Make sure the .jar file has the appropriatepermissions - 644.
Execute the following command:
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
Created 03-18-2017 06:10 PM
Thanks @Jay SenSharma
I was pointing to the wrong path. After correcting it, ambari server started successfully. Still not sure what removed server.jdbc.driver.path.
Created 03-18-2017 07:10 PM
The driver jar might have been deleted accidentally. As i have never seen such issue earlier, there is no existing JIRA as well on the similar issue. So i am suspecting that it might be deleted accidentally.
Created 03-20-2017 06:26 AM
Created 02-16-2020 04:39 AM
i was do that these steps but still gives this problems
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Ambari database consistency check started...
No errors were found.
ERROR: Exiting with exit code 1.
REASON: Database check failed to complete. Please check /var/log/ambari-server/ambari-server.log and /var/log/ambari-server/ambari-server-check-database.log for more information.
Created 02-16-2020 01:04 PM
Hi @AarifAkhter,
As this thread was marked 'Solved' 03-18-2017 you would have a better chance of receiving a resolution by starting a new thread. This will also provide the opportunity to provide details specific to your environment that could aid others in providing a more targeted answer to your question.
Created 03-20-2017 06:19 AM
run
ambari-server setup --jdbc-db=mysql --jdbc-driver=path
usually path of mysql driver is /usr/share/java/mysql-connector-java.jar. It may be different for you.
restart ambari server.