Troubleshooting
Problem
Care must be taken with socket descriptors in programs to avoid causing communications errors.
Resolving The Problem
Users might have programs that use sockets to communicate with other systems. These programs can be called from the database host server as a stored procedure or a trigger invoked from an ODBC, OLEDB, ADO.Net, or JDBC client. The programs can also be called from the program call/remote command server by using IBM i Access Client Solutions APIs or IBM Toolbox for Java classes. When a user-written program that makes socket calls is invoked through a host server, the programmer must ensure that they do not make a call on the socket descriptor used by the host server to communicate with the client.
A common programming error is to issue a close on an uninitialized socket descriptor variable. The error often occurs in an error handling routine or initialization function. This function might attempt a close as part of its cleanup without verifying that the socket was successfully opened. This works when the program is called interactively. However, when called through a host server, this will usually close the socket descriptor being used by the host server causing an error.
Common errors include:
A common programming error is to issue a close on an uninitialized socket descriptor variable. The error often occurs in an error handling routine or initialization function. This function might attempt a close as part of its cleanup without verifying that the socket was successfully opened. This works when the program is called interactively. However, when called through a host server, this will usually close the socket descriptor being used by the host server causing an error.
Common errors include:
- Communications error on the client.
- QZDASOINIT jobs might go into a loop with no error being reported in the job log. VLOG 0700 F230 is logged against the job. (Error reporting was improved in V5R3.)
- QZDASOINIT jobs might report the following errors: CPE3450 - Descriptor not valid, CPIAD08 RC3450 - Host server communications error occurred.
- QZRCSRVS jobs might report message CPIAD07 f/QZBSCOMM t/QZBSCOMM Host server error occurred with reason code 10. Reallocation of server buffer failed. The error invalid socket descriptor can also be logged.
[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Host Servers","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Historical Number
26983119
Was this topic helpful?
Document Information
Modified date:
01 January 2020
UID
nas8N1016977