TCP/IP errors

The software returns the SQL30081N message (-30081) when a TCP/IP specific communications error is detected. The TCP/IP error that is encountered by the communication subsystem is returned in the list of error tokens for the SQL30081N message.


The following table lists the common TCP/IP error symbols (errnos) on Linux® and UNIX operating systems. The complete list of the TCP/IP errors in UNIX operating system can be found in the /usr/include/sys/errno.h file. On Linux operating systems, the complete list of the TCP/IP errors are found in the /usr/include/asm/errno.h file.

Table 1. UNIX TCP/IP error numbers
errnos AIX® error number HP-UX error number Solaris error number Linux error number Description
EINTR 4 4 4 4 The function specified was interrupted by a signal.
EBADF 9 9 9 9 Bad socket. The socket might have been corrupted.
EAGAIN 11 11 11 11 Resource temporarily unavailable.
EFAULT 14 14 14 14 Bad address.

On connect, bad address.

On receive, the data was directed to be received into a nonexistent or protected part of the process address space. The buffer is not valid.

EBUSY 16 16 16 16 Resource busy.
EINVAL 22 22 22 22 Invalid argument that is passed to the specified function or the socket is closed. The EINVAL error can be returned if there was a memory overwrite, or buffer overflow problem.
ENFILE 23 23 23 23 Too many open files in the system.
EMFILE 24 24 24 24 The per-process file descriptor table is full. Number of file descriptors/sockets for the process is exceeded.
ENOSPC 28 28 28 28 No space is left on a device or system table.
EPIPE 32 32 32 32 Broken pipe.
EWOULDBLOCK 54 246 11 11 On the connect function, the range that is allocated for TCP/UDP ephemeral ports is exhausted. (Some operating systems return the same error as EAGAIN.)
ENOTSOCK 57 216 95 88 Socket operation on a non-socket.
ENOPROTOOPT 61 220 99 92 Option is unknown.
EADDRINUSE 67 226 125 98 The specified address is already in use. Perhaps the previous process that established the connection was terminated abnormally or was not cleaned up properly.
EADDRNOTAVAIL 68 227 126 99 The specified host name or IP address is not available from the local system.
ENETDOWN 69 228 127 100 The network is down.
ENETUNREACH 70 229 128 101 No route to the network or host is available.
ENETRESET 71 230 129 102 The network dropped the connection on reset.
ECONNRESET 73 232 131 104 Connection was reset by the partner.
ENOBUFS 74 233 132 105 Insufficient memory or resources were available in the system to complete the call.
EISCONN 75 234 133 106 The socket is already connected.
ENOTCONN 76 235 134 107 The socket is not connected.
ETIMEDOUT 78 238 145 110 The connection was timed out.
ECONNREFUSED 79 239 146 111 The connection was refused. If you are trying to connect to the database, check that the database manager and TCP/IP protocol support at the server were started successfully.

If you specified the SOCKS protocol support, you must also ensure that the TCP/IP protocol support at the SOCKS server was started successfully.

EHOSTDOWN 80 241 147 112 The host is down.
EHOSTUNREACH 81 242 148 113 No route to the host is available.

The complete list of the TCP/IP errors in Windows operating system can be found in the winsock2.h file. The winsock2.h file is not installed on your system if you do not have a development environment installed. For a list of Windows TCP/IP errors, search for Windows sockets error codes at