5. Communications Error Codes
If a communications error occurs between the client and the host while using these communication extensions, the error returned from the TCP/IP software is mapped to a standard APPC error code.
The most commonly experience APPC error codes are 20, 6 and 17. This APPC code is often enough to let you know what caused the issue. Refer to the following for simple resolutions:
APPC Error Code
|
Likely cause
|
20
|
Indicates that the application could not connect to the listener. Check that the listener is running, and that there are no firewall issues for the listener port on the server.
|
6
|
Indicates a login validation error. If you are sure the correct username and password has been used, use LANSA comms tracing on the server to determine the cause of the error.
|
17
|
Indicates an unexpected error on the server, after login validation. Check the joblog/x_err.log on the server for problem.
|
|
If this is not enough information, and the problem is reproducible, you should turn on the Errors tracing option to determine what the original error was. For further details refer to Set Logging and Tracing Options. With the Errors tracing option turned on, you will get an entry in the trace file similar to this:
02/06/97 16:12:39 testw32(0xa2:0x9f):LCOSlapi:Error:COMM_Allocate
Native Error:10061 CPIC Error:20 in connect
"Native Error" shows the original error returned by the communications software. In this example; error code10061 (WSAECONNREFUSED) occurred on a "connect" request because the host was not running the Listener, required to listen on sockets port 4545.
Following is a list of possible error codes returned by the WSAGetLastError() (Winsock) call, along with their explanations. These error numbers are consistent across all Windows Sockets-compliant implementations.
Error Code
|
Windows Sockets Code
|
Berkeley equivalent
|
Interpretation
|
10004
|
WSAEINTR
|
EINTR
|
As in standard C
|
10009
|
WSAEBADF
|
EBADF
|
As in standard C
|
10013
|
WSEACCES
|
EACCES
|
As in standard C
|
10014
|
WSAEFAULT
|
EFAULT
|
As in standard C
|
10022
|
WSAEINVAL
|
EINVAL
|
As in standard C
|
10024
|
WSAEMFILE
|
EMFILE
|
As in standard C
|
10035
|
WSAEWOULDBLOCK
|
EWOULDBLOCK
|
As in BSD
|
10036
|
WSAEINPROGRESS
|
EINPROGRESS
|
|
10037
|
WSAEALREADY
|
EALREADY
|
As in BSD
|
10038
|
WSAENOTSOCK
|
ENOTSOCK
|
As in BSD
|
10039
|
WSAEDESTADDRREQ
|
EDESTADDRREQ
|
As in BSD
|
10040
|
WSAEMSGSIZE
|
EMSGSIZE
|
As in BSD
|
10041
|
WSAEPROTOTYPE
|
EPROTOTYPE
|
As in BSD
|
10042
|
WSAENOPROTOOPT
|
ENOPROTOOPT
|
As in BSD
|
10043
|
WSAEPROTONOSUPPORT
|
EPROTONOSUPPORT
|
As in BSD
|
10044
|
WSAESOCKTNOSUPPORT
|
ESOCKTNOSUPPORT
|
As in BSD
|
10045
|
WSAEOPNOTSUPP
|
EOPNOTSUPP
|
As in BSD
|
10046
|
WSAEPFNOSUPPORT
|
EPFNOSUPPORT
|
As in BSD
|
10047
|
WSAEAFNOSUPPORT
|
EAFNOSUPPORT
|
As in BSD
|
10048
|
WSAEADDRINUSE
|
EADDRINUSE
|
As in BSD
|
10049
|
WSAEADDRNOTAVAIL
|
EADDRNOTAVAIL
|
As in BSD
|
10050
|
WSAENETDOWN
|
ENETDOWN
|
As in BSD
|
10051
|
WSAENETUNREACH
|
ENETUNREACH
|
As in BSD
|
10052
|
WSAENETRESET
|
ENETRESET
|
As in BSD
|
10053
|
WSAECONNABORTED
|
ECONNABORTED
|
As in BSD
|
10054
|
WSAECONNRESET
|
ECONNRESET
|
As in BSD
|
10055
|
WSAENOBUFS
|
ENOBUFS
|
As in BSD
|
10056
|
WSAEISCONN
|
EISCONN
|
As in BSD
|
10057
|
WSAENOTCONN
|
ENOTCONN
|
As in BSD
|
10058
|
WSAESHUTDOWN
|
ESHUTDOWN
|
As in BSD
|
10059
|
WSAETOOMANYREFS
|
ETOOMANYREFS
|
As in BSD
|
10060
|
WSAETIMEDOUT
|
ETIMEDOUT
|
As in BSD
|
10061
|
WSAECONNREFUSED
|
ECONNREFUSED
|
As in BSD
|
10062
|
WSAELOOP
|
ELOOP
|
As in BSD
|
10063
|
WSAENAMETOOLONG
|
ENAMETOOLONG
|
As in BSD
|
10064
|
WSAEHOSTDOWN
|
EHOSTDOWN
|
As in BSD
|
10065
|
WSAEHOSTUNREACH
|
EHOSTUNREACH
|
As in BSD
|
10091
|
WSASYSNOTREADY
|
|
Network subsystem is unusable.
|
10092
|
WSAVERNOTSUPPORTED
|
|
Windows Sockets DLL cannot support this app.
|
10093
|
WSANOTINITIALISED
|
|
|
11001
|
WSAHOST_NOT_FOUND
|
HOST_NOT_FOUND
|
As in BSD
|
11002
|
WSATRY_AGAIN
|
TRY_AGAIN
|
As in BSD
|
11003
|
WSANO_RECOVERY
|
NO_RECOVERY
|
As in BSD
|
11004
|
WSANO_DATA
|
NO_DATA
|
As in BSD
|
|