|
|
This appendix provides reference information on Remote Procedure Call (RPC) error handling. It includes these sections:
When an error is detected by the RPC library, it calls an externally defined function called rpclog(). The default rpclog shipped with the RPC library simply formats the information passed it and then print it to stderr.
This section lists error messages generated by the RPC library. Messages are listed in alphabetical order. For each message, the error number and csect string (csectp) are also given.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 33 - The malloc() function for RPC buffer failed.
Explanation Error Number 31 - Corrupted cache caused search to be aborted.
Explanation Error Number 32 - The malloc() function for cache element failed.
Explanation Error Number 9 - Received a bad RPC reply.
Explanation Error Number 35 - Broadcast RPC is not supported.
Explanation Error Number 13 - The select() function failed when broadcasting.
Explanation Error Number 10 - The socket() routine failed.
Explanation Error Number 14 - Client did not receive a reply to a broadcast request.
Explanation Error Number 12 - The sendto() routine using broadcast address failed.
Explanation Error Number 11 - The setsockopt() routine for SO_BROADCAST failed.
Explanation Error Number 3 - The string is replaced with a message generated by clnt_spcreateerror(). See "Message Formatting" for the formatting of string.
Explanation Error Number 5 - The string is replaced with a message generated by clnt_sperrno(). See "Message Formatting" for the formatting of string.
Explanation Error Number 4 - The string is replaced with a message generated by clnt_sperror(). See "Message Formatting" for the formatting of string.
Explanation Error Number 6 - Could not XDR RPC call header.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 7 - The gethostname() function failed.
Explanation Error Number 8 - The gethostbyname() function failed.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 2 - Could not XDR authentication structures.
Explanation Error Number 22 - The select() function failed.
Explanation Error Number 16 - Procedure number is 0 on call to registerrpc().
Explanation Error Number 17 - Couldn't create an RPC server.
Explanation Error Number 18 - Could not register RPC server with portmapper. d_value1 is the RPC program number and d_value2 is the RPC program version. number.
Explanation Error Number 22 - The select() function failed.
Explanation Error Number 15 - UNIX credentials are invalid. d_value1 is the UNIX group id, d_value2 is the authentication string length and d_value3 is the authentication length.
Explanation Error Number 24 - The getsockname() or listen() function failed.
csectp - SVCTCP_CREATE
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 23 - Could not create TCP socket.
Explanation Error Number 26 - The getsockname() function failed.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 25 - Could not create UDP socket.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 27 - Cache enable request when cache already enabled
Explanation Error Number 28 - The malloc() function for cache control space failed.
Explanation Error Number 29 - The malloc() function for cache data space failed.
Explanation Error Number 30 - The malloc() function for cache FIFO failed.
Explanation Error Number 19 - Could not send reply.
Explanation Error Number 21 - Program d_value was never registered. d_value is the RPC program number.
Explanation Error Number 20 - Could not send reply. d_value is the RPC program number.
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 1 - Could not malloc().
Explanation Error Number 1 - Could not malloc().
These error message formatting routines are described in this section:
Explanation This routine formats a message about errors related to the creation of a client handle. It should be passed a pointer to user message text. It formats the message this way and then returns a pointer to the formatted message:
%s: %ns\n| %s | User-supplied message text. |
| %ns | Message text generated by clnt_sperrno() acting on the client status. |
If the creation error is neither RPC_PMAPFAILURE nor RPC_SYSTEMERROR, a newline is appended. Otherwise these errors are additionally added:
| %s | User supplied message text. |
| %ns | Message text generated by clnt_sperrno() acting on the client status. |
| %es | Message text generated by lnt_sperrno() acting on the RPC error status. |
| %s | User supplied message text |
| %ns | Message text generated by clnt_sperrno() acting on the client status. |
| %ss | Message text generated by indexing into the perror() socket library error table using the RPC err. If the error is not in the socket library perror() error table %ss is replaced with ERROR %d where %d is the RPC library errno value. |
| RPC: SUCCESS | Successful completion |
| RPC: CAN'T ENCODE ARGUMENTS | Client could not XDR the arguments it is to pass to the remote procedure. |
| RPC: CAN'T DECODE RESULT | Client could not XDR the result returned from the remote procedure. |
| RPC: UNABLE TO SEND | Client could not send an RPC CALL to the remote procedure. |
| RPC: UNABLE TO RECEIVE | Client could not receive the RPC REPLY from the remote procedure. |
| RPC: TIMED OUT | Client did not get a response from the server within an allowable amount of time. |
| RPC: INCOMPATIBLE VERSIONS OF RPC | The versions of the RPC protocol used by the server and the client are not equal. |
| RPC: AUTHENTICATION ERROR | Authentication check failed on remote system. |
| RPC: PROGRAM UNAVAILABLE | Program is not available on remote system. |
| RPC: PROGRAM/VERSION MISMATCH | Program and version are not available on the remote system. |
| RPC: PROCEDURE UNAVAILABLE | Requested procedure of the selected program on the remote system is not available for use. |
| RPC: SERVER CAN'T DECODE ARGUMENTS | Remote system could not understand arguments passed to the selected program. |
| RPC: REMOTE SYSTEM ERROR | Remote system had a major failure trying to execute the selected program. |
| RPC: UNKNOWN HOST | User selected a remote host system that is unknown to the DNR. |
| RPC: UNKNOWN PROTOCOL | User specified an unsupported protocol to be used for transport. |
| RPC: PORT MAPPER FAILURE | Remote host's portmapper could not be communicated with properly. |
| RPC: PROGRAM NOT REGISTERED | Remote program is not registered with the remote host's portmapper. |
| RPC: FAILED (UNSPECIFIED ERROR) | Error was not specific enough to justify its own error code. |
| RPC: (UNKNOWN ERROR CODE) | Error is not decipherable. |
Explanation This error message formatting routine requires two arguments:
It formats a message and returns a pointer to the formatted message text.
The user message is formatted followed by a colon and a space (e.g., "%s: "). A message generated by clnt_sperrno() (see "Message Formatting") follows and then the message formatting varies based on the current error status.
If the error is any of these, a newline is attached to the user portion and the pointer to the text returned:
Thus the message for these looks like this:
s: %ns\nAn example is:
clnt_sperror(clntp, "USER MESSAGE");
The clnt_sperrno routine returns
RPC: CAN'T DECODE RESULT t
and the message pointer points to
USER MESSAGE: RPC: CAN'T DECODE RESULT\n
If the error is RPC_CANTSEND or RPC_CANTRECV, the user portion of the message is followed by an entry from the perror() error message list of the socket library.
The generalized format of the message looks like this:
%s: %ns ; errno = %ss\n| %s | User message passed. |
| %ns | clnt_sperrno() generated message text. |
| %ss | Message from the socket library. |
If the error status is RPC_VERSMISMATCH, the message is formatted like this:
%s: %ns ; LOW VERSION = %lul, HIGH VERSION = %luh\n| %s | User message passed. |
| %ns | clnt_sperrno() generated message text. |
| %lul | Lowest decimal version number of the RPC program running. |
| %luh | Highest decimal version number of the RPC program running. |
If the error status is RPC_AUTHERROR, the message is formatted like this:
%s: %ns ; why = %sa:| %s | User message provided. |
| %ns | clnt_sperrno() generated message text. |
| %sa | Authentication message generated. |
These are the authentication messages:
| Message | Description |
|---|---|
| AUTHENTICATION OK | The authentication is OK. |
| INVALID CLIENT CREDENTIAL | Client authentication credentials are incorrect for authentication type. |
| SERVER REJECTED CREDENTIAL | Client credentials do not allow access to the procedure. |
| INVALID CLIENT VERIFIER | Credentials are not supported by client. |
| SERVER REJECTED VERIFIER | Server could not decode this type of authentication. |
| CLIENT CREDENTIAL TOO WEAK | Client credentials formatted properly but are of too low authentication to allow access. |
| INVALID SERVER VERIFIER | Credentials are not supported by server. |
| FAILED (UNSPECIFIED ERROR) | Authentication failed for an error that does not justify a more specific error code. |
| UNKNOWN AUTHENTICATION ERROR - %d | The authentication error is unknown to the RPC library. The %d is replaced with the decimal value of the authentication error. |
If the error status is RPC_PROGVERSMISMATCH, the message is formatted this way:
%s: %ns ; LOW VERSION = %lul, HIGH VERSION = %luh\n| %s | User message provided. |
| %ns | clnt_sperrno() generated message text. |
| %lul | Lowest version of the RPC program running. |
| %luh | Highest version of the RPC program running. |
If the error status is not mentioned, the message is formatted this way:
%s: %ns ; S1 = %lu1, S2 = %lu2\n| %s | User message provided. |
| %ns | clnt_sperrno() generated message text. |
| %lu1 | First error argument. |
| %lu2 | Second error argument. |
|
|