STAF API Return Codes

API Return Codes

Note: In some shell environments, return codes above 255 may be returned modulo256. This can, in particular, cause service return codes (which range from4000 upward) to be mistaken for (possibly) non-existent common STAF returncodes. For example, if a service returned the return code 4010, this mightappear to be the return code 170 (4010 modulo 256) in a shellenvironment.

Table 1. STAF API Return Codes
Error CodeMeaningComment
0No error 
1Invalid APIThis indicates that a process has tried to call an invalid internal STAF API.If this error occurs, report it to the authors.
2Unknown ServiceYou have tried to submit a request to a service that is unknown to STAFProc.Verify that you have correctly registered the service.
3Invalid HandleYou are passing an invalid handle to a STAF API. Ensure that you are usingthe handle you received when you registered with STAF.
4Handle already existsThis indicates that you are trying to register a process with one name whenthat process has already been registered with a different name. If youregister the same process multiple times, ensure that you use the same nameon each registration call.

Note: If you receive this error code when trying to perform an operationother than registering a service, report it to the authors.

5Handle does not existYou are trying to perform an operation on a handle that does not exist.For example, you may be trying to stop a process, but you are specifying thewrong handle.
6Unknown ErrorAn unknown error has occurred. This error is usually an indication of aninternal STAF error. If this error occurs, report it the authors.
7Invalid Request StringYou have submitted an improperly formatted request to a service. See theappropriate section in this document for the syntax of the service's requests,or contact the provider of the service.

Note: Additional information regarding the exact syntax error may be providedin the result passed back from the submit call.

8Invalid Service ResultThis indicates an internal error with the service to which a request wassubmitted. If this error occurs, report it to the authors and the serviceprovider.
9Rexx ErrorThis indicates an internal error in an external Rexx service. If this erroroccurs, report it to the authors and the service provider.

Note: The actual Rexx error code will be returned in the result passed backfrom the submit call.

10Base OS ErrorThis indicates that a base operating system error was encountered.

Note: The actual base operating system error code, and possibly additionalinformation about the error, will be returned in the result passed backfrom the submit call.

11Process Already CompleteYou are trying to perform an invalid operation on a process that hasalready completed. For example, you may be trying to stop the process orregister for a process end notification.
12Process Not CompleteYou are trying to free process information for a process that is stillexecuting.
13Variable Does Not ExistYou are trying to get, remove, or resolve a variable that does not exist.Remember that variables are case sensitive. The name of the variable thatdoes not exist will be in the result passed back from the submit call.
14UnResolvable StringYou have requested to resolve a string that cannot be resolved. Thisindicates that you have exceeded the resolution depth of the VAR service. Themost common cause of this is recursive variables definitions.
15Invalid Resolve StringThe string you requested to be resolved has a non-matching left or rightcurly brace. Ensure that all variable references have both left and rightcurly braces.
16No Path To EndpointThis indicates that STAFProc was not able to submit the request tothe requested endpoint (i.e. target machine). This error usually indicatesone or more of the following:
  1. STAFProc is not running on the target machine.
  2. The requested endpoint is not valid.
  3. The network interface or port for the requested endpoint is not supported.
  4. A firewall is blocking communication via the port for the requested endpoint.
  5. A secure network interface is being used to communicate to a machine thatdoesn't have a secure network interface configured with the same certificate.
Alternatively, you may need to increase your CONNECTTIMEOUT value for thenetwork interface and/or increase your CONNECTATTEMPTS value in your STAF.cfgfile.
17File Open ErrorThis indicates that there was an error opening the requested file.Some possible explanations are that the file/path does not exist, containsinvalid characters, or is locked.

Note: Additional information regarding which file could not be opened may beprovided in the result passed back from the submit call.

18File Read ErrorThis indicates that there was an error while trying to read data from a file.

Note: Additional information regarding which file could not be read from may beprovided in the result passed back from the submit call.

19File Write ErrorThis indicates that there was an error while trying to write data to a file.

Note: Additional information regarding which file could not be written to maybe provided in the result passed back from the submit call.

20File Delete ErrorThis indicates that there was an error while trying to delete a file ordirectory.

Note: Additional information regarding which file or directory could not bedeleted may be provided in the result passed back from the submit call.

21STAF Not RunningThis indicates that STAFProc is not running on the local machine with thesame STAF_INSTANCE_NAME (and/or the same STAF_TEMP_DIR if on a Unix machine).

Notes:

  1. If the STAF_INSTANCE_NAME environment variable is not set, it defaults to "STAF".
  2. On Unix, if the STAF_TEMP_DIR environment variable is not set, it defaults to "/tmp".This environment variable is not used on Windows.
  3. This error can also occur when submitting a request using the local IPCinterface on a Unix machine if the socket file that the local interface useshas been inadvertently deleted.
  4. To get more information on this error, set special environment variableSTAF_DEBUG_21=1 and resubmit your local STAF service request.
22Communication ErrorThis indicates an error transmitting data across the network, or to thelocal STAF process. For example, you would receive this error if STAFProc.exewas terminated in the middle of a service request, or if a bridge went downin the middle of a remote service request. This can also indicate that therequested endpoint is not valid (e.g. it has an invalid network interface andport combination such as a non-secure tcp interface with the port for a securessl interface).
23Trustee Does Not ExistYou have requested to delete a trustee, and the trustee does not exist.Verify that you have specified the correct trustee.
24Invalid Trust LevelYou have attempted to set a machine or default trust level to an invalidlevel. The valid trust levels are from zero to five.
25Insufficient Trust LevelYou have submitted a request for which you do not have the requiredtrust level to perform the request.

Note: Additional information regarding the required trust level may beprovided in the result passed back from the submit call.

26STAF Registration ErrorThis indicates that an external service encountered a problem when tryingto register with STAF. Ensure that STAF has been properly installed andconfigured.
27Service Configuration ErrorThis indicates an error with the configuration of an external service. One possible explanation is that the LIBRARY you specified when configuring theservice does not exist. Or, if you specified the EXECUTE option, verify thatthe executable exists and has the execute permission. Or, if you specified thePARMS option, verify that all of the service configuration are valid. Consultthe appropriate documentation for the service to verify whether you haveconfigured the service properly, or contact the service provider.

Note: Additional information regarding why the service configuration failedmay be provided in the result passed back from the submit call.

28Queue FullThis indicates that you are trying to queue a message to a handle's queue,but the queue is full. The maximum queue size can be increased by usingthe MAXQUEUESIZE statement in the STAF Configuration File.
29No Queue ElementThis indicates that you tried to GET or PEEK a particular element in aqueue, but no such element exists, or the queue is empty.
30Notifiee Does Not ExistThis indicates that you are trying to remove a message notification fora machine/process/priority combination which does not exist in thenotification list.
31Invalid API LevelThis indicates that a process has tried to call an invalid level of aninternal STAF API. If this error occurs, report it to the authors.
32Service Not UnregisterableThis indicates that you are trying to unregister a service that is notunregisterable. Note that internal services are not unregisterable.
33Service Not AvailableThis indicates that the service you requested is not currently able toaccept requests. The service may be in the process of initializing orterminating.
34Semaphore Does Not ExistThis indicates that you are trying to release, query, or delete a semaphorethat does not exist.
35Not Semaphore OwnerThis indicates that you are trying to release a semaphore for which yourprocess is not the current owner.
36Semaphore Has Pending RequestsThis indicates that you are trying to delete either a mutex semaphore thatis currently owned or an event semaphore that has waiting processes.
37TimeoutThis indicates that you submitted a request with a timeout value and therequest did not complete within the requested time.
38Java ErrorThis indicates an error performing a Java native method call. A descriptionof the error will be returned in the result passed back from the submit call.
39Converter ErrorThis indicates an error performing a codepage conversion. The most likelycause of this error is that STAF was not properly installed. However, it ispossible that you are currently using a codepage that was not present orspecified during STAF installation.
40Move ErrorThis indicates that there was an error while trying to move a file ordirectory.

Note: Additional information regarding the error may be provided in theresult passed back from the submit call.

41Invalid ObjectThis indicates that an invalid object was specified to a STAF API.If you receive this return code via a standard STAFSubmit call, report it tothe authors and the service provider.
42Invalid ParmThis indicates that an invalid parameter was specified to a STAF API.If you receive this return code via a standard STAFSubmit call, report it to the authors and the service provider.
43Request Number Not FoundThis indicates that the specified Request Number was not found. The specified Request Number may be invalid, or the request's information may no longer be available from the Service Service (for example, if the SERVICE FREEcommand had previously been issued for the request number).
44Invalid Asynch OptionThis indicates that an invalid Asynchronous submit option was specified.
45Request Not CompleteThis indicates that the specified request is not complete. This error code would be returned, for example, if you requested the result of a request which has not yet completed.
46Process Authentication DeniedThis indicates that the userid/password you specified could not be authenticated. The userid/password may not be valid or authentication may be disabled.
47Invalid ValueThis indicates that an invalid value was specified. This is closely relatedto the Invalid Request String return code, but indicates that a specific value in the request is invalid. For example, you may not have specified a number where a number was expected.

Note: Additional information regarding which value is invalid may be providedin the result passed back from the submit call.

48Does Not ExistThis indicates that the item you specified does not exist.

Note: Additional information regarding which item could not be found may beprovided in the result passed back from the submit call.

49Already ExistsThis indicates that the item you specified already exists.

Note: Additional information regarding which item already exists may beprovided in the result passed back from the submit call.

50Directory Not EmptyThis indicates that you have tried to delete a directory, but that directoryis not empty.

Note: Additional information specifying the directory which could not be deletedmay be provided in the result passed back from the submit call.

51Directory Copy ErrorThis indicates that you have tried to copy a directory, but errors occurredduring the copy.

Note: Additional information specifying the entries which could not be copiedmay be provided in the result passed back from the submit call.

52Diagnostics Not EnabledThis indicates that you tried to record diagnostics data, but diagnosticshave not been enabled. You must enable diagnostics before you can recorddiagnostics data.
53Handle Authentication FailedThis indicates that the user, credentials, and/or authenticator you specifiedcould not be authenticated. The user/credentials may not be valid or theauthenticator may not be registered.

Note: Additional information specifying why authentication was denied may beprovided in the result passed back from the submit call.

54Handle Already AuthenticatedThis indicates that the handle is already authenticated. The handle must beunauthenticated in order to be authenticated.
55Invalid STAF VersionThis indicates that the version of STAF (or the version of a STAF service)is lower than the minimum required version.
56Request cancelledThis indicates that the request has been cancelled.

Note: Additional information specifying why the request was cancelled may beprovided in the result passed back from the submit call.

57Create Thread ErrorThis indicates that a problem occurred creating a new thread. One possibleexplanation is that there's not enough memory available to create a newthread.

Note: Additional information specifying why creating a new thread failed may beprovided in the result passed back from the submit call.

58Maximum Size ExceededThis indicates that the size of a file exceeded the maximum size allowed(e.g. per the MAXRETURNFILESIZE operational parameter or per theMAXRETURNFILESIZE setting for the STAX service).A maximum file size is usually set to prevent the creation of result stringsthat require more memory than is available which can cause errors or crashes.

Note: Additional information specifying why this error occurred may beprovided in the result passed back from the submit call.

59Maximum Handles ExceededThis indicates that a new handle could not be created/registeredbecause the maximum number of active handles allowed by STAF has beenexceeded. You need to delete one or more handles that are no longerbeing used. The Handle service's LIST HANDLES SUMMARY request providesinformation on the maximum number of active STAF handles and this may behelpful in better understanding why this error occurred.
60Not Pending RequesterYou cannot cancel a pending request your handle did not submit unlessyou specify the FORCE option.
4000+Service DefinedError codes of 4000 and beyond are service specific error codes. Eithersee the appropriate section in this document for the syntax of the service'srequests, or contact the provider of the service.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值