Error Code

来自中国分布式计算总站
Julian Yuen讨论 | 贡献2008年6月9日 (一) 16:30的版本 (新页面: == General == 注:整理&翻译ing...by 团长~<br> This is a value that is returned by a program "Function" and is used to indicate the success or failure of the execution of that functi...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转到导航 跳转到搜索

General

注:整理&翻译ing...by 团长~
This is a value that is returned by a program "Function" and is used to indicate the success or failure of the execution of that function. If the function operates without error, the value zero (0) is returned.

If the function fails to operate a negative value is returned indicating that the function failed for one reason or another. These Error Codes are used by the Developers to trace down the causes of failure.

The list of "official" Error Codes used in BOINC are defined in a file boinc/lib/error_numbers.h. There are other error codes that you may see as you work with BOINC. These error codes are the ones that are returned by the Web Site and FTP software used to support BOINC.

BOINC Error Codes

The following table lists the Error Codes that you may see while using or programming the BOINC System. The table contains the following information:

  • The internal "name" of the Error Code.
  • The actual numeric value, given here for completeness and because early versions of the BOINC Client Software used to display the values.
  • The value that is displayed in an error message.
  • Additional information about the Error Code.
Error "Name" Numeric
Value
Display Text Additional Details
BOINC_SUCCESS 0 Success
ERR_SELECT -100 system select
ERR_MALLOC -101 system malloc
ERR_READ -102 system read
ERR_WRITE -103 system write
ERR_FREAD -104 system fread
ERR_FWRITE -105 system fwrite
ERR_IO -106 system I/O A failure to read/write from the Disk Drive, or in the case of network transmissions, a failure to send and receive data.

A failure to send and receive data to and from a Project Server generally means that during the transmission to or from the Project Server, or a router along the way has reset the TCP connection between the BOINC Client Software and the Project Server. This can happen for a number of different reasons, such as the Project Server being overloaded, or packets being lost in route.

Note:
This is probably the most common error after an outage of the Project.
ERR_CONNECT -107 system connect Cannot connect to the FTP site.
ERR_FOPEN -108 system fopen The file is "open" and in use by another process, or write access to the file cannot be obtained.
ERR_RENAME -109 system rename The file could not be renamed.
ERR_UNLINK -110 system unlink
ERR_OPENDIR -111 system opendir
ERR_XML_PARSE -112 unexpected XML tag or syntax Unexpected XML tag or XML format
ERR_GETHOSTBYNAME -113 can't resolve hostname Couldn't resolve the hostname.
ERR_GIVEUP_DOWNLOAD -114 timeout on download Too much time has elapsed without progress on the file transfer, or we got a 404 (not found) status code from the server.
ERR_GIVEUP_UPLOAD -115 timeout on upload
ERR_NULL -116 null pointer An unexpected NULL pointer.
ERR_NEG -117 unexpected negative value unexpected negative value
ERR_BUFFER_OVERFLOW -118 buffer overflow caught buffer overflow
ERR_MD5_FAILED -119 md5 checksum failed for file MD5 checksum failed for a file
ERR_RSA_FAILED -120 RSA key check failed for file RSA key check failed for a file
ERR_OPEN -121 system open
ERR_DUP2 -122 system dup
ERR_NO_SIGNATURE -123 no signature
ERR_THREAD -124 creating a thread Error creating a thread.
ERR_SIGNAL_CATCH -125 caught signal
ERR_UPLOAD_TRANSIENT -127 transient upload error
ERR_UPLOAD_PERMANENT -128 fatal upload error
ERR_IDLE_PERIOD -129 user preferences say can't start work Can't start work because of user preferences.
ERR_ALREADY_ATTACHED -130 already attached to project
ERR_FILE_TOO_BIG -131 file size too big an output file was bigger than max_nbytes
ERR_GETRUSAGE -132 system getrusage getrusage failed
ERR_BENCHMARK_FAILED -133 benchmark failed
ERR_BAD_HEX_FORMAT -134 hex format key data bad hex-format key data is bad
ERR_USER_REJECTED -135 user rejected executable file user rejected executable file
ERR_DB_NOT_FOUND -136 no database rows found in lookup/enumerate no rows found in lookup() or enumerate()
ERR_DB_NOT_UNIQUE -137 database lookup not unique not unique in lookup()
ERR_DB_CANT_CONNECT -138 can't connect to datbase
ERR_GETS -139 system gets/fgets gets() or fgets()
ERR_SCANF -140 system scanf/fscanf scanf() or fscanf()
ERR_STRCHR -141 system strchr
ERR_STRSTR -142 system strstr
ERR_READDIR -143 system readdir
ERR_SHMGET -144 system shmget
ERR_SHMCTL -145 system shmctl
ERR_SHMAT -146 system shmat
ERR_FORK -471 system fork
ERR_EXEC -148 system exec
ERR_NOT_EXITED -149 process didn't exit a process didn't exit that was supposed to
ERR_NOT_IMPLEMENTED -150 system call not implemented a system call not implemented on this platform
ERR_GETHOSTNAME -151 system gethostname
ERR_NETOPEN -152 system netopen
ERR_SOCKET -153 system socket
ERR_FCNTL -154 system fcntl
ERR_AUTHENTICATOR -155 authentication error scheduler request host ID doesn't match authenticator
ERR_SCHED_SHMEM -156 scheduler shared memory contents bad
ERR_ASYNCSELECT -157 system async select
ERR_BAD_RESULT_STATE -158 bad result state
ERR_DB_CANT_INIT -159 can't init database
ERR_NOT_UNIQUE -160 state files have redundant entries state files had redundant entries
ERR_NOT_FOUND -161 not found inconsistent client state
ERR_NO_EXIT_STATUS -162 no exit status in scheduler request exit_status not found in scheduler request
ERR_FILE_MISSING -163 file missing
ERR_NESTED_UNHANDLED_EXCEPTION_DETECTED -164 nested unhandled exception
ERR_SEMGET -165 system get semaphore
ERR_SEMCTL -166 system control semaphore
ERR_SEMOP -167 system op semaphore
ERR_FTOK -168 system ftok
ERR_SOCKS_UNKNOWN_FAILURE -169 socket unknown
ERR_SOCKS_REQUEST_FAILED -170 socket request
ERR_SOCKS_BAD_USER_PASS -171 socket bad user password
ERR_SOCKS_UNKNOWN_SERVER_VERSION -172 socket unknown server version
ERR_SOCKS_UNSUPPORTED -173 socket unsupported
ERR_SOCKS_CANT_REACH_HOST -174 socket can't reach host
ERR_SOCKS_CONN_REFUSED -175 socket connection refused
ERR_TIMER_INIT -176 timer init
ERR_RSC_LIMIT_EXCEEDED -177 resource limit exceeded
ERR_INVALID_PARAM -178 invalid parameter
ERR_SIGNAL_OP -179 signal op
ERR_BIND -180 system bind
ERR_LISTEN -181 system listen
ERR_TIMEOUT -182 timeout
ERR_PROJECT_DOWN -183 project down
ERR_HTTP_ERROR -184 http error
ERR_RESULT_START -185 result start
ERR_RESULT_DOWNLOAD -186 result download
ERR_RESULT_UPLOAD -187 result upload
ERR_INVALID_URL -189 invalid URL
ERR_MAJOR_VERSION -190 major version
ERR_NO_OPTION -191 no option
ERR_MKDIR -192 mkdir
ERR_INVALID_EVENT -193 invalid event
ERR_ALREADY_RUNNING -194 already running
ERR_NO_APP_VERSION -195 no app version
ERR_WU_USER_RULE -196 user already did result for this workunit
ERR_ABORTED_VIA_GUI -197 result aborted via GUI
ERR_INSUFFICIENT_RESOURCE -198 insufficient resources
ERR_RETRY -199 retry
ERR_WRONG_SIZE -200 wrong size
ERR_USER_PERMISSION -201 user permission e.g. user didn't allow network connection
ERR_SHMEM_NAME -202 can't get shared mem segment name
ERR_NO_NETWORK_CONNECTION -203 no available network connection
ERR_IN_PROGRESS -204
ERR_BAD_EMAIL_ADDR -205
ERR_BAD_PASSWD -206
ERR_NONUNIQUE_EMAIL -207
ERR_ACCT_CREATION_DISABLED -208
ERR_ATTACH_FAIL_INIT -209 Couldn't start master page download
ERR_ATTACH_FAIL_DOWNLOAD -210 Couldn't download master page
ERR_ATTACH_FAIL_PARSE -211 Couldn't parse master page
ERR_ATTACH_FAIL_BAD_KEY -212 Invalid account key
ERR_ATTACH_FAIL_FILE_WRITE -213 Couldn't write account file


Web Site & FTP Error Codes

Below is a summary of what the HTTP Response Codes mean. For more in-depth information, see section 10 of RFC 2616 (which defines what the reponse codes mean) or Fielding, et al. - 10 Status Code Definitions. For further information, you can also have a look at HTTP Status Code Information

Authors should pay special attention to 400s and 500s, since these mean that the user did not successfully get to the page. 300s mean that the user was redirected, so the link might be changing. 600s generally mean that there was a problem with the URL, so the Link Checker couldn't figure out how to check it.


Error Code Short Name Meaning
1xx: Informational - These reponse codes indicate a provisional response that should be followed by another response.
100 Continue The server has not rejected the initial part of the request, and the client should continue.
101 Switching Protocols The server agrees with the client's request to change protocols.
2xx Successful - These reponse codes indicate that the client's request was successfully received, understood, and accepted.
200 OK The request has succeeded.
201 Created The request has been fulfilled and resulted in a new resource being created.
202 Accepted The request has been accepted for processing, but the processing has not been completed.
203 Non-Authoritative Information The returned headers are not definitive, but are gathered from a local or a third-party copy.
204 No Content The server has fulfilled the request but does not need to return any output.
205 Reset Content The server has fulfilled the request and the client should reset the document view (primarily intended to make data-entry easier).
206 Partial Content The server has fulfilled the partial GET request for the resource.
3xx: Redirection - These response codes indicate that the client was redirected to another URI, or that further action needs to be taken by the user agent in order to fulfill the request.
4xx: Client Errors - These response codes are intended for cases in which the client seems to have erred.
400 Bad Request The request could not be understood by the server due to malformed syntax. The client system SHOULD NOT repeat the request without modifications.
401 Unauthorized The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication" (43)
403 Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead.

Typically due to file access permissions on the server.

In the case of the BOINC System, the Web Server thinks that the HTTP data stream sent by the client (e.g. a Web Browser or the BOINC Daemon) was correct, but access to the resource identified by the URL is forbidden for some reason.

This indicates a fundamental access problem, which may be difficult to resolve because the HTTP protocol allows the Web Server to give this response without providing any reason at all. So the 403 error is equivalent to a blanket 'NO' by the Server - with no further discussion allowed.

By far the most common reason for this error is that directory browsing is forbidden for the Web Site. In the case of a response to a Scheduler Request Message or an Upload/Download action is because of an error on the server-side of BOINC System.

404 Not Found Couldn't find the Web Page. The server has not found anything matching the URI/URL.
5xx: Server Errors - These response codes indicate cases in which the server is aware that it has erred or is incapable of performing the request.
500 Internal Server Error The Server experienced an internal error and could not process the request.
501 Not Implemented The server does not support the functionality required to fulfill the request.
502 Bad Gateway The server is a gateway or proxy and received an invalid response from the upstream server it accessed in attempting to fulfill the request.
503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
504 Gateway Timeout The server is a gateway or proxy and did not receive a timely response from the upstream server.
505 HTTP Version Not Supported The server does not support, or refuses to support, the HTTP protocol version that was used in the request.
6xx: Internal Errors - These response codes indicate that an error occurred in the link checking program itself (these are unofficial error codes used to report problems).

Developer Information

Code Location:   boinc/lib/util.C const char* boincerror(int which_error), and
boinc/lib/error_numbers.h
Documentation:   boinc/lib/util.C
CVS Extract:   cvs -d :pserver:anonymous:@alien.ssl.berkeley.edu:/home/cvs/cvsroot checkout boinc/lib/util.C

cvs -d :pserver:anonymous:@alien.ssl.berkeley.edu:/home/cvs/cvsroot checkout boinc/lib/error_numbers.h

外部链接