Page 1 of 1

Communications Link Failure - MySQL Database

Posted: Thu Dec 06, 2018 9:29 am
by Support_Chris
Question:
I'm receiving sporadic errors in the UI or the application log (goanywhere.log or node specific goanywhere.log) that say "Communications Link Failure. The last packet successfully received from the server was xxx milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. "

Answer:

This happens when GoAnywhere MFT uses a stale connection in the database connection pool. Though technically it would be best to have the database pool clean up stale connections, a jdbc client (MFT) has a validate option that can be performed when it connects to the database server.

To add this validation option, you will need to modify the database.xml file (located under (install dir)/config) for the MFT instance(s) that connect to the MySQL server to reflect the following 2 entry keys:


<entry key="validationQuery">SELECT 1</entry>
<entry key="testOnBorrow">true</entry>


Then, simply save the file and restart the OS service for GoAnywhere MFT. GoAnywhere MFT will begin validating your database connections are not stale.

Please note that if you see this line in your error:

"Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up."

within the logs that show the "Communications Link Failure" error, the entry keys for the database.xml file have more than likely already been implemented and there is a strong chance you are losing connection to the database. You will need to check these connections to the Database and likely involve a network engineer with your DBA to determine why these connections are being interrupted or failing.