Failed to obtain a connection to schema 'domain_project_db' - timeout expired

  • KM00980528
  • 06-Jun-2014
  • 06-Jun-2014

Summary

CTdDbException in Jboss caused by a TCPIP issue

Question

The error shows as follow:
 
com.mercury.optane.core.db.CTdDbException: Failed to obtain a connection to schema 'ontap_ontap_db' - timeout expired
at com.mercury.optane.core.db.CConnectionPool.getConnection(CConnectionPool.java:396)
at com.mercury.optane.core.db.CConnectionManager.getNotTransactedConnection(CConnectionManager.java:239)
at com.mercury.optane.core.db.CConnectionManager.getConnection(CConnectionManager.java:212)
at com.mercury.optane.core.db.CAbsStatement.<init>(CAbsStatement.java:91)
at com.mercury.optane.core.db.CTdPreparedStatement.<init>(CTdPreparedStatement.java:98)
at com.mercury.optane.core.db.CTdPreparedStatement.<init>(CTdPreparedStatement.java:94)
at com.mercury.optane.core.db.spring.JDBCTemplate$AbstractPreparedStatementCreator.create(JDBCTemplate.java:1231)
at com.mercury.optane.core.db.spring.JDBCTemplate.executeQuery(JDBCTemplate.java:1050)
 

Answer

The error shows as follow:


com.mercury.optane.core.db.CTdDbException: Failed to obtain a connection to schema 'ontap_ontap_db' - timeout expired
at com.mercury.optane.core.db.CConnectionPool.getConnection(CConnectionPool.java:396)
at com.mercury.optane.core.db.CConnectionManager.getNotTransactedConnection(CConnectionManager.java:239)
at com.mercury.optane.core.db.CConnectionManager.getConnection(CConnectionManager.java:212)
at com.mercury.optane.core.db.CAbsStatement.<init>(CAbsStatement.java:91)
at com.mercury.optane.core.db.CTdPreparedStatement.<init>(CTdPreparedStatement.java:98)
at com.mercury.optane.core.db.CTdPreparedStatement.<init>(CTdPreparedStatement.java:94)
at com.mercury.optane.core.db.spring.JDBCTemplate$AbstractPreparedStatementCreator.create(JDBCTemplate.java:1231)
at com.mercury.optane.core.db.spring.JDBCTemplate.executeQuery(JDBCTemplate.java:1050)

 

Also could be shown as:

10.229.140.137; nested exception is:
java.net.SocketException: No buffer space available (maximum connections reached?): connect
2012-03-09 23:11:28,089 ERROR [ExecutionTask] - Unhandled exception occurred: server.ExecutionTaskRemote.RMI_CALL_FAILED : Failed to create RMI call


How to fix ti:

1. Add TcpTimedWaitDelay and MaxUserPort to the TCP/IP service. Also, install windows updates based on recommendations from Microsoft due problems with these parameters.

 “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelay”
 
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\MaxUserPort”

Detailed information here:

 


The default maximum number of ephemeral TCP ports is 5000 in the products that are included in the "Applies to" section. A new parameter has been added in these products. To increase the maximum number of ephemeral ports, follow these steps:
1.     Start Registry Editor.
2.     Locate the following subkey in the registry, and then click Parameters:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3.     On the Edit menu, click New, and then add the following registry entry:
Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)


Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. After the release of security bulletin MS08-037, the behavior of Windows Server 2003 was changed to more closely match that of Windows Server 2008 and Windows Vista. For more information about Microsoft security bulletin MS08-037, click the following article numbers to view the articles in the Microsoft Knowledge Base:

951746
(http://support.microsoft.com/kb/951746/ )
MS08-037: Description of the security update for DNS in Windows Server 2008, in Windows Server 2003, and in Windows 2000 Server (DNS server-side): July 8, 2008
951748
(http://support.microsoft.com/kb/951748/ )
MS08-037: Description of the security update for DNS in Windows Server 2003, in Windows XP, and in Windows 2000 Server (client side): July 8, 2008

953230
(http://support.microsoft.com/kb/953230/ )
MS08-037: Vulnerabilities in DNS could allow spoofing
4.     Exit Registry Editor, and then restart the computer.
Note An additional TCPTimedWaitDelay registry parameter determines how long a closed port waits until the closed port can be reused.