JIRA Operations Fail with the SQL Exception No more data to read from socket
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
Symptoms
When using JIRA, any actions can fail and the following appears in the atlassian-jira.log
:
2012-08-29 08:30:54,816 StreamsCompletionService::thread-93 ERROR 852338 510x3749x6 1u59tfy 10.4.5.86 /plugins/servlet/streams [atlassian.streams.internal.LocalActivityProvider] Error building feed
com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT jiraissue.ID FROM hrsjira.jiraissue jiraissue INNER JOIN hrsjira.changegroup cg ON jiraissue.ID = cg.issueid WHERE (jiraissue.PROJECT IN (?) ) AND (cg.AUTHOR IS NULL ) ORDER BY cg.CREATED DESC (No more data to read from socket)
at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findListIteratorByCondition(DefaultOfBizDelegator.java:469)
at com.atlassian.jira.issue.changehistory.DefaultChangeHistoryManager.doFindUserHistory(DefaultChangeHistoryManager.java:345)
at com.atlassian.jira.issue.changehistory.DefaultChangeHistoryManager.findUserHistory(DefaultChangeHistoryManager.java:259)
at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211)
at $Proxy122.findUserHistory(Unknown Source)
at sun.reflect.GeneratedMethodAccessor746.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
This error can present itself with multiple exceptions and any SQL executed. The main focus is to identify if the SQL Exception is outputting the error No more data to read from socket
.
Cause
When a database server reboots or a network failure has occurred, all connections in the database connection pool are broken. To overcome this issue, JIRA would normally need restarting (or for JIRA WAR distributions, the application server running JIRA would need restarting). Please refer to Surviving Connection Closures for further information.
Resolution
Ensure that the validation query is set as in:
- Surviving Connection Closures (in the documentation for JIRA 4.4.x and later)
- Surviving Connection Closures (in the documentation for JIRA 4.3.x and earlier)