It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

confluence cannot connect to mysql after upgrade to mysql 8 Edited

Centos 8
successfully upgraded to mysql 8 (mysql-server-8.0.17-3.)

https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html


MySQL Community Downloads platform independent mysql connector does not provide 
mysql-connector-java-x.x.xx-bin.jar

only 
mysql-connector-java-x.x.xx.jar


I have put this to  <installation-directory>/confluence/WEB-INF/lib

Now  confluence start is stuck at 


02-Apr-2020 11:41:11.704 INFORMATION [main] org.apache.catalina.startup.Catalina.start Server startup in [19.828] milliseconds


02-Apr-2020 11:52:41.837 WARNUNG [Catalina-utility-1] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8090-exec-1] (id=[41]) has been active for [61.355] milliseconds (since [02.04.20 11:51]) to serve the same request for [https://confluence.XXXXXX.de/] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.
java.lang.Throwable
at java.base@11.0.5/java.lang.Object.wait(Native Method)

....
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base@11.0.5/java.lang.Thread.run(Unknown Source)

02-Apr-2020 11:53:21.846 WARNUNG [Catalina-utility-4] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread [http-nio-8090-exec-1] (id=[41]) was previously reported to be stuck but has completed. It was active for approximately [96.970] milliseconds.


What should I Do now?

1 answer

I have the same problem. Confluence 7.4 cannot connect to mysql 8.0.20.

Tomcat thread times out after 60 seconds. Mysql is accessible locally via command line with the confluence username and its password.

I can confirm that that mysql-connector-java-8.0.20.jar is correctly placed and being used. If I remove it, confluence immediately returns with an error.

 

This is the message at the end of catalina log:

 

07-May-2020 12:27:34.747 WARNING [Catalina-utility-4] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread [http-nio-8090-exec-1] (id=[40]) was previously reported to be stuck but has completed. It was active for approximately [99,528] milliseconds. There is/are still [1] thread(s) that are monitored by this Valve and may be stuck.

Okay, here is how I solved this.

 

This issue is related to the CEST time zone value which somehow (bug?) causes this error in the confluence log:

java.sql.SQLException: The server time zone value 'CEST' is unrecognized or represents more than one time zone.

 

What I did was to inject the Timezone value in the  jdbc mysql connect string:

?serverTimezone=Europe/Zurich,

like this:

jdbc:mysql://SERVER:PORT/CONFLUENCE_DB?serverTimezone=Europe/Zurich

That should solve this problem.

In addition to catalina logs, the Confluence logs found in

/var/atlassian/application-data/confluence/logs

are of great help.

 

Now Confluence 7.4 is working fine with MySQL 8.0.20.

I am having the same issue. Exactly what file you have to edit to add the 

serverTimezone=Europe/Zurich ?

I think I figure out the file. 

/var/atlassian/application-data/confluence/confluence.cfg.xml

I should have checked it there first. Thanks for the clue!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.3.4
TAGS
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

5,345 views 4 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you