Troubleshooting
Problem
Client applications fail with error: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.111.11.2". Communication function detecting the error: "send". Protocol specific error code(s): "9", "*", "*". SQLSTATE=08001
Symptom
A client application receives error:
1136389842.023890 - 08-04-2009 10:50:42.023890] SQLErrorW(pszSqlState="01002" - X"00300031003000300032", pfNativeError=-30081, pszErrorMsg="[IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.250.48.6". Communication function detecting the error: "send". Protocol specific error code(s): "9", "*", "*". SQLSTATE=08001
Cause
The error 9 from looking at the errno.h file is:
#define EBADF 9 /* Bad file descriptor */
"rc 9 (bad file descriptor) - Sockets are handled as file objects which are opened and closed (using fopen() and fclose()) - if DB2 requests a "recv" sockets__API call on a socket that no longer exists, we get back a rc=9 when the socket's API attempts to open the "file".
Environment
All
Diagnosing The Problem
Check the DCS Entry for the INTERRUPT_ENABLED set. This is the third positional parameter (,,INTERRUPT_ENABLED ).
Resolving The Problem
Anytime a client application terminates a connection by means of closing the application abnormally or any kind of interrupt, it will terminate the connection to the mainframe and the gateway will receive an SQL30081N error. "SQL30081 rc=9" for Bad File Descriptor is caused by the host not responding to the client connect request. This indicates that the client timed out the connection with the server because the client did not receive a reply in a reasonable amount of time.
The solution is to set QUERYTIMEOUTINTERVAL=0 in the db2cli.ini and stop and restart the application.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21395987