Unable to startup Confluence with java.net.ConnectException
Problem
Confluence could not be started up despite tomcat seems up from catalina.out
log. The following appears in the atlassian-confluence.log
:
WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] [mchange.v2.resourcepool.BasicResourcePool] run com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@5c9aa764 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at sun.reflect.GeneratedConstructorAccessor27.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
...
Caused by: 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.
at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
...
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
...
Cause
- DB server is down.
- URL in Database string is wrong
- The domain or hostname are not resolved to the correct server or unknown to DNS.
- Missing or wrong port number in JDBC URL.
- DB server doesn't accept TCP/IP connections.
- Something in between Java and DB is blocking connections, e.g. a firewall, proxy or antivirus.
Resolution
Things to check (in order):
- Your database is up and running
- Your database is reachable from the Confluence server
- Your authentication details are correct, you can check this via <conf-home>/confluence.cfg.xml
- Your traffic to the database server is not being blocked by a firewall/proxy server.
Last modified on Jun 20, 2019
Powered by Confluence and Scroll Viewport.