Operations fail in Jira server with connection pool errors in logs

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

My JIRA application is unable to function during certain operations.

The following appears in the atlassian-jira.log:

2015-01-20 12:27:11,903 localhost-startStop-1 ERROR      [NoModule] There was an error getting a DBCP datasource.
java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool
	at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:59)
	at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.trackConnection(DBCPConnectionFactory.java:242)
	at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:73)
	at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
	at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)
	at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)
	at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
	at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:367)
	at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:515)
	at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:844)
	at org.ofbiz.core.entity.GenericDAO.selectByCondition(GenericDAO.java:793)
	at org.ofbiz.core.entity.GenericDAO.selectByCondition(GenericDAO.java:772)
	at org.ofbiz.core.entity.GenericHelperDAO.findByCondition(GenericHelperDAO.java:178)
	at org.ofbiz.core.entity.GenericDelegator.findByCondition(GenericDelegator.java:1083)
	at com.atlassian.jira.propertyset.CachingOfBizPropertyEntryStore$EntryLoader.load(CachingOfBizPropertyEntryStore.java:512)
	at com.atlassian.jira.propertyset.CachingOfBizPropertyEntryStore$EntryLoader.load(CachingOfBizPropertyEntryStore.java:505)
	at com.atlassian.cache.memory.MemoryCacheManager$3$1.load(MemoryCacheManager.java:132)
	...
Caused by: java.sql.SQLException: I/O Error: Connection reset
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2311)
	at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:603)
	at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:357)
	at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
	at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
    ...
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.DataInputStream.readFully(Unknown Source)
	at java.io.DataInputStream.readFully(Unknown Source)
	at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:842)
	at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:723)
	at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
	at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2206)
	...

Diagnosis

There are a number of different exceptions that cause the "Unable to obtain a connection from the underlying connection pool" error message to be displayed. Take a look in the 'Caused by' section of the stack traces in the atlassian-jira.log, in this scenario the stack traces will mention connection resets. Specifically above this is java.net.SocketException: Connection reset.

There are other problems that can provide the same error message such as Operations in Jira server fail with connection pool errors in logs.

Cause

When a database server reboots or a network failure has occurred, all connections in the database connection pool are broken, and JIRA would normally need restarting to recreate those connections. There are some further information on this within Surviving Connection Closures documentation. This can also be caused by network problems, such as a firewall refusing entry to the server or a piece of network hardware not working.

Resolution

Ensure that the validation query is set as described in Surviving Connection Closures. If the connection pool is timing out waiting for an idle object, this is a different error and is described in Operations in Jira server fail with connection pool errors in logs, including how to fix.



Description

My JIRA application is unable to function during certain operations with the following error:

ERROR [NoModule] There was an error getting a DBCP datasource. java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool


Last modified on Sep 25, 2019

Was this helpful?

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