Created on 03-27-2017 11:48 AM - edited 08-18-2019 03:11 AM
I install ambari-server 2.4.2.0 and the newest hdp 2.5
after I start the ambari server, I found mysql was connect too often.
my mysql server just used for ambari ,hive,grafana.
when I stop the ambari server,the top commands show :
After I start the ambari server, the top command show :
I use show processlist in mysql,it often shows:
mysql-connector-java .... show variables where ...
I don't know why the ambari server connect to mysql so frequent..
Created 03-27-2017 12:14 PM
Are to you using Ambari Database as mysql?
By any change is there any possibility that you can upgrade your mysql-connector-java driver version from 5.1.17 to 5.1.38 or later. As i remember there was some CPU utilization issue reported for the "5.1.17" version of connector.
You can drop the latest mysql-connector-java jar inside the "/usr/share/java" directory and then create a symlink "/usr/share/java/mysql-connector-java.jar"
as following to point to it. Then restart the components that are using mysql.
# ls -lan /usr/share/java/mysql-* -rw-r--r--. 1 0 0 819803 Jun 22 2012 /usr/share/java/mysql-connector-java-5.1.17.jar -rwxrwxrwx. 1 0 0 992808 Mar 9 08:49 /usr/share/java/mysql-connector-java-5.1.41-bin.jar lrwxrwxrwx. 1 0 0 35 Mar 9 08:50 /usr/share/java/mysql-connector-java.jar -> mysql-connector-java-5.1.41-bin.jar
.
mysql-connector-java driver downlaod link: https://dev.mysql.com/downloads/connector/j/5.1.html
Created 03-27-2017 12:14 PM
Are to you using Ambari Database as mysql?
By any change is there any possibility that you can upgrade your mysql-connector-java driver version from 5.1.17 to 5.1.38 or later. As i remember there was some CPU utilization issue reported for the "5.1.17" version of connector.
You can drop the latest mysql-connector-java jar inside the "/usr/share/java" directory and then create a symlink "/usr/share/java/mysql-connector-java.jar"
as following to point to it. Then restart the components that are using mysql.
# ls -lan /usr/share/java/mysql-* -rw-r--r--. 1 0 0 819803 Jun 22 2012 /usr/share/java/mysql-connector-java-5.1.17.jar -rwxrwxrwx. 1 0 0 992808 Mar 9 08:49 /usr/share/java/mysql-connector-java-5.1.41-bin.jar lrwxrwxrwx. 1 0 0 35 Mar 9 08:50 /usr/share/java/mysql-connector-java.jar -> mysql-connector-java-5.1.41-bin.jar
.
mysql-connector-java driver downlaod link: https://dev.mysql.com/downloads/connector/j/5.1.html
Created 02-20-2018 03:08 PM
This helped me 🙂
just a litte more detai for the sym link:
rm /usr/share/java/mysql-connector-java.jar ln -s /usr/share/java/mysql-connector-java-5.1.45-bin.jar /usr/share/java/mysql-connector-java.jar
Created 03-19-2020 12:56 AM
Thank you for your answer.
I am facing similar issue with Ambari 2.7.0, Mysql 5.7.29.
I am unable to get into admin account even once and on click of Login it just hangs and says 'Unable to connect to Ambari Server. Confirm Ambari Server is running and you can reach Ambari Server from this machine.' after some seconds.'
I even posted details here: https://stackoverflow.com/q/60743259/7051479
Could you please help me out on this.
Created 03-28-2017 01:45 AM
I use yum install the mysql-connector-java
Created 03-28-2017 01:48 AM
Created 03-28-2017 03:38 AM
I install newer mysql-connector,and it is ok now
uninstall older connector:
rpm -e mysql-connector-java
install newer version from mysql local HDP-UTILS repo
then restart the ambari server:
sudo service ambari-server restart
Created 07-12-2017 07:01 AM
It sees strange,I found the version of mysql-connector is mysql-connector-java-5.1.17-6.el6.noarch on mysql another cluster,but there is nothing wrong about it.