com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

Created by Steve Place, Modified on Tue, 25 Apr 2023 at 04:32 PM by Steve Place

This error can be caused by an old data source that no longer works but is still trying to connect, or by a data source trying to access a corrupted database/table. If the error goes away temporarily after resetting the data source connection (by restarting Stardog or recreating the data source), then the problem is likely that the connection is timing out. In this case, adding the maxAge connection pool property as a data source configuration option to a value that is shorter than MySQL's timeout will automatically discard connections that are older than this limit.

If resetting the connection does not resolve the issue, you can test the database by running the stardog-admin virtual source_metadata command, where is the properties file for the data source of the virtual graph causing issues. If you don't have a properties file for that data source, you can run the command stardog-admin data-source options [datasource] >

Adding the -v flag to virtual source_metadata can give more information, helping you debug.

Running virtual source_metadata with multiple options, such as using just the properties file, the properties file + a schema, properties + schema + column name, etc., can help you narrow down which schema or table is corrupt.

For more information on virtual graphs, please see the docs.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article