Database connection issues due to "Queries leading to data modification are not allowed"

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When performing action that depend on saving data into the database, the following appears in the atlassian-confluence.log:

2013-10-04 10:00:30,018 ERROR [DefaultQuartzScheduler_Worker-2] [org.quartz.core.JobRunShell] run Job DEFAULT.ClusterSafetyJob threw an unhandled Exception: 
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not update: [com.atlassian.confluence.cluster.safety.ClusterSafetyNumber#18907137]; uncategorized SQLException for SQL []; SQL state [S1009]; error code [0]; Connection is read-only. Queries leading to data modification are not allowed; nested exception is java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

Cause

This is a known issue in versions of the MySql driver prior to 5.1.7. See MySQL Bugs: #38747: java.sql.SQLException: Connection is read-only for more details.

Resolution

  1. Shutdown Confluence
  2. Download the latest compatible version of MySQL driver recommended at our list of supported Database JDBC Drivers
  3. Remove the current MySQL driver from <confluence-install>/confluence/WEB-INF/lib
  4. Unzip and copy the new driver to <confluence-install>/confluence/WEB-INF/lib
  5. Start Confluence.

Last modified on May 1, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.