The following line in your error stack shows that your Hive MySQL is having some issues while getting schema version.
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version. Underlying cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException : Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. SQL Error code: 0
Please check if you mysql server is running fine?
# ps -ef | grep mysqld
- Check if mysql port is opened? (here 3306 is the default mysql port in your case it might be different)
# netstat -tnlpa | grep 3306
- If mysql has opened the listen port and the port is accessible without any firewall issue on Mysql Server host.
# service iptables status # service iptables stop
Also please check mysql logs to see if there is any issue?
# grep 'log-error' /etc/my.cnf log-error=/var/log/mysqld.log # less /var/log/mysqld.log