CURL錯誤碼

語言: CN / TW / HK

 There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are:

1

Unsupported protocol. This build of curl has no support for this protocol.

2

Failed to initialize.

3

URL malformed. The syntax was not correct.

4

A feature or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you probably need another build of libcurl!

5

Couldn't resolve proxy. The given proxy host could not be resolved.

6

Couldn't resolve host. The given remote host was not resolved.

7

Failed to connect to host.

8

Weird server reply. The server sent data curl couldn't parse.

9

FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server.

10

FTP accept failed. While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar.

11

FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.

12

During an active FTP session while waiting for the server to connect back to curl, the timeout expired.

13

FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.

14

FTP weird 227 format. Curl couldn't parse the 227-line the server sent.

15

FTP can't get host. Couldn't resolve the host IP we got in the 227-line.

16

HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems, see the error message for details.

17

FTP couldn't set binary. Couldn't change transfer method to binary.

18

Partial file. Only a part of the file was transferred.

19

FTP couldn't download/access the given file, the RETR (or similar) command failed.

21

FTP quote error. A quote command returned error from the server.

22

HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if -f, --fail is used.

23

Write error. Curl couldn't write data to a local filesystem or similar.

25

FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.

26

Read error. Various reading problems.

27

Out of memory. A memory allocation request failed.

28

Operation timeout. The specified time-out period was reached according to the conditions.

30

FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!

31

FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.

33

HTTP range error. The range "command" didn't work.

34

HTTP post error. Internal post-request generation error.

35

SSL connect error. The SSL handshaking failed.

36

Bad download resume. Couldn't continue an earlier aborted download.

37

FILE couldn't read file. Failed to open the file. Permissions?

38

LDAP cannot bind. LDAP bind operation failed.

39

LDAP search failed.

41

Function not found. A required LDAP function was not found.

42

Aborted by callback. An application told curl to abort the operation.

43

Internal error. A function was called with a bad parameter.

45

Interface error. A specified outgoing interface could not be used.

47

Too many redirects. When following redirects, curl hit the maximum amount.

48

Unknown option specified to libcurl. This indicates that you passed a weird option to curl that was passed on to libcurl and rejected. Read up in the manual!

49

Malformed telnet option.

51

The peer's SSL certificate or SSH MD5 fingerprint was not OK.

52

The server didn't reply anything, which here is considered an error.

53

SSL crypto engine not found.

54

Cannot set SSL crypto engine as default.

55

Failed sending network data.

56

Failure in receiving network data.

58

Problem with the local certificate.

59

Couldn't use specified SSL cipher.

60

Peer certificate cannot be authenticated with known CA certificates.

61

Unrecognized transfer encoding.

62

Invalid LDAP URL.

63

Maximum file size exceeded.

64

Requested FTP SSL level failed.

65

Sending the data requires a rewind that failed.

66

Failed to initialise SSL Engine.

67

The user name, password, or similar was not accepted and curl failed to log in.

68

File not found on TFTP server.

69

Permission problem on TFTP server.

70

Out of disk space on TFTP server.

71

Illegal TFTP operation.

72

Unknown TFTP transfer ID.

73

File already exists (TFTP).

74

No such user (TFTP).

75

Character conversion failed.

76

Character conversion functions required.

77

Problem with reading the SSL CA cert (path? access rights?).

78

The resource referenced in the URL does not exist.

79

An unspecified error occurred during the SSH session.

80

Failed to shut down the SSL connection.

82

Could not load CRL file, missing or wrong format (added in 7.19.0).

83

Issuer check failed (added in 7.19.0).

84

The FTP PRET command failed

85

RTSP: mismatch of CSeq numbers

86

RTSP: mismatch of Session Identifiers

87

unable to parse FTP file list

88

FTP chunk callback reported error

89

No connection available, the session will be queued

90

SSL public key does not matched pinned public key

91

Invalid SSL certificate status.

92

Stream error in HTTP/2 framing layer.

93

An API function was called from inside a callback.

94

An authentication function returned an error.

95

A problem was detected in the HTTP/3 layer. This is somewhat generic and can be one out of several problems, see the error message for details.

96

QUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers.

XX

More error codes will appear here in future releases. The existing ones are meant to never change.

 

CURLE_OK(0)

所有罰款。繼續像往常一樣。

CURLE_UNSUPPORTED_PROTOCOL(1)

你的URL傳遞給libcurl的使用協議,這libcurl的不支援。支援可能是你沒有使用一個編譯時的選項,它可以是一個拼寫錯的協議字串,或者只是一個協議的libcurl沒有程式碼。

 

CURLE_FAILED_INIT(2)

非常早期的初始化程式碼失敗。這可能是內部錯誤或問題,資源問題,一些基本的東西可能無法完成初始化時間。

CURLE_URL_MALFORMAT(3)

該網址的格式不正確。

CURLE_NOT_BUILT_IN(4)

libcurl的內建在​​一個編譯時決定所要求的功能,協議或購股權沒有被發現。這意味著,一個功能或選項是不啟用或明確禁用的libcurl建時,為了得到它的功能,你必須得到一個重建的libcurl的。

CURLE_COULDNT_RESOLVE_PROXY(5)

無法解析代理伺服器。代理主機無法得到解決。

CURLE_COULDNT_RESOLVE_HOST(6)

無法解析主機。給定的遠端主機沒有得到解決。

CURLE_COULDNT_CONNECT(7)

connect()的主機或代理失敗。

CURLE_FTP_WEIRD_SERVER_REPLY(8)

連線到一個FTP伺服器後,libcurl的預期得到一定的回覆返回。這個錯誤程式碼表示,它有一個奇怪的或壞的答覆。指定的遠端伺服器可能不是一個確定的FTP伺服器。

CURLE_REMOTE_ACCESS_DENIED(9)

我們被拒絕訪問的資源的URL。對於FTP,發生這種情況而力圖改變的遠端目錄。

CURLE_FTP_ACCEPT_FAILED(10)

在等待伺服器的連線時,一個主動FTP會話使用,被送到控制連線或類似的錯誤程式碼。

CURLE_FTP_WEIRD_PASS_REPLY(11)

傳送到伺服器的FTP密碼後,libcurl的預計正確的答覆。此錯誤程式碼指示返回了意外的程式碼。

CURLE_FTP_ACCEPT_TIMEOUT(12)

在當前的FTP會話在等待伺服器連線,CURLOPT_ACCEPTTIMOUT_MS(或內部預設),超時過期。

CURLE_FTP_WEIRD_PASV_REPLY(13)

libcurl的失敗作為一個PASV或EPSV命令從伺服器得到一個合理的結果。伺服器是有缺陷的。

CURLE_FTP_WEIRD_227_FORMAT(14)

FTP伺服器返回一個227行作為一個PASV命令的響應。如果libcurl的無法解析該行,此返回程式碼被傳遞迴。

CURLE_FTP_CANT_GET_HOST(15)

內部故障查詢主機使用新的連線。

CURLE_FTP_COULDNT_SET_TYPE(17)

收到一個錯誤,當試圖傳送模式設定為二進位制或ASCII。

CURLE_PARTIAL_FILE(18)

檔案傳輸,短於或大於預期。發生這種情況時,伺服器首先報告預期的傳輸大小,然後提供資料不匹配前面給出的大小。

CURLE_FTP_COULDNT_RETR_FILE(19)

這是一個奇怪的回答“RETR”命令或一個零位元組傳輸完成。

CURLE_QUOTE_ERROR(21)

當傳送到遠端伺服器,自定義的“QUOTE”命令的一個命令返回的錯誤程式碼為400或更高(對於FTP)或表示不成功的完成命令。

CURLE_HTTP_RETURNED_ERROR(22)

這是返回CURLOPT_FAILONERROR設定為TRUE和HTTP伺服器返回的錯誤程式碼是> = 400。

CURLE_WRITE_ERROR(23)

發生錯誤,寫作時接收到的資料到本地檔案,或者返回錯誤libcurl的一個寫回調。

CURLE_UPLOAD_FAILED(25)

開始上載失敗。對於FTP,伺服器通常否認的STOR命令。通常的錯誤緩衝區包含了伺服器的解釋。

CURLE_READ_ERROR(26)

有一個問題讀取本地檔案或返回一個錯誤的讀回撥。

CURLE_OUT_OF_MEMORY(27)

記憶體分配請求失敗。這是嚴重的不良和活動,如果發生過嚴重搞砸了。

CURLE_OPERATION_TIMEDOUT(28)

操作超時。根據條件達到指定的超時期間。

CURLE_FTP_PORT_FAILED(30)

FTP PORT命令返回錯誤。這主要是當你還沒有足夠的地址指定了一個良好的libcurl的使用。SeeCURLOPT_FTPPORT。

CURLE_FTP_COULDNT_USE_REST(31)

FTP REST命令返回錯誤。如果伺服器是明智的,這不應該發生。

CURLE_RANGE_ERROR(33)

伺服器不支援或接受範圍請求。

CURLE_HTTP_POST_ERROR(34)

這是一個奇怪的錯誤,主要發生是由於內部的混亂。

CURLE_SSL_CONNECT_ERROR(35)

出現問題的地方,在SSL / TLS握手。你真正想要的的錯誤緩衝區和閱讀郵件,因為它針對問題稍微。可能是證書(檔案格式,路徑,許可權),密碼,和其他人。

CURLE_BAD_DOWNLOAD_RESUME(36)

下載無法恢復,因為指定的偏移量為檔案的邊界。

CURLE_FILE_COULDNT_READ_FILE(37)

無法開啟的檔案FILE :/ /。最有可能的,因為該檔案的路徑不能識別現有檔案。你是否檢查檔案的許可權?

CURLE_LDAP_CANNOT_BIND(38)

LDAP無法繫結。LDAP繫結操作失敗。

CURLE_LDAP_SEARCH_FAILED(39)

LDAP搜尋失敗。

CURLE_FUNCTION_NOT_FOUND(41)

函式沒有找到。一個必需的zlib的功能沒有被發現。

CURLE_ABORTED_BY_CALLBACK(42)

通過回撥中止。返回的回撥“中止”libcurl的。

CURLE_BAD_FUNCTION_ARGUMENT(43)

內部錯誤。函式呼叫了一個錯誤的引數。

CURLE_INTERFACE_FAILED(45)

介面錯誤。指定的出介面不能使用。設定介面使用傳出連線的源IP地址與CURLOPT_INTERFACE。

CURLE_TOO_MANY_REDIRECTS(47)

過多的重定向。以下重定向時,libcurl的創下的最高金額。設定您的與CURLOPT_MAXREDIRS限制。

CURLE_UNKNOWN_OPTION(48)

無法識別的選項傳遞給libcurl的/。請參閱相應的文件。這是最有可能在程式中使用libcurl的問題。的的錯誤緩衝區可能包含準確的選項,它涉及更具體的資訊。

CURLE_TELNET_OPTION_SYNTAX(49)

telnet選項字串被非法格式化。

CURLE_PEER_FAILED_VERIFICATION(51)

遠端伺服器的SSL證書或SSH的MD5指紋被認為是不正常的。

CURLE_GOT_NOTHING(52)

沒有從伺服器返回的,和得到什麼的情況下,被認為是一個錯誤。

CURLE_SSL_ENGINE_NOTFOUND(53)

未找到指定的加密引擎。

CURLE_SSL_ENGINE_SETFAILED(54)

設定所選的SSL加密引擎,預設情況下失敗!

CURLE_SEND_ERROR(55)

傳送網路資料失敗。

CURLE_RECV_ERROR(56)

如果接收網路資料。

CURLE_SSL_CERTPROBLEM(58)

與當地的客戶端證書的問題。

CURLE_SSL_CIPHER(59)

無法使用指定的密碼。

CURLE_SSL_CACERT(60)

同儕憑證不能與已知的CA證書進行身份驗證。

CURLE_BAD_CONTENT_ENCODING(61)

無法識別的傳輸編碼。

CURLE_LDAP_INVALID_URL(62)

無效的LDAP URL。

CURLE_FILESIZE_EXCEEDED(63)

最大檔案大小超過。

CURLE_USE_SSL_FAILED(64)

要求FTP SSL水平失敗。

CURLE_SEND_FAIL_REWIND(65)

在做了一個傳送操作捲曲,倒帶重傳的資料,但的倒帶操作失敗。

CURLE_SSL_ENGINE_INITFAILED(66)

SSL發動機啟動失敗。

CURLE_LOGIN_DENIED(67)

遠端伺服器拒絕捲曲登入(加入7.13.1)

CURLE_TFTP_NOTFOUND(68)

TFTP伺服器上找不到檔案。

CURLE_TFTP_PERM(69)

TFTP伺服器上的許可權問題。

CURLE_REMOTE_DISK_FULL(70)

出在伺服器上的磁碟空間。

CURLE_TFTP_ILLEGAL(71)

非法的TFTP操作。

CURLE_TFTP_UNKNOWNID(72)

未知TFTP傳輸ID。

CURLE_REMOTE_FILE_EXISTS(73)

檔案已經存在,並不會被覆蓋。

CURLE_TFTP_NOSUCHUSER(74)

這個錯誤不應該被返回正常工作的TFTP伺服器。

CURLE_CONV_FAILED(75)

字元轉換失敗。

CURLE_CONV_REQD(76)

呼叫者必須註冊轉換回調。

CURLE_SSL_CACERT_BADFILE(77)

問題讀取SSL證書(路徑的訪問許可權?)

CURLE_REMOTE_FILE_NOT_FOUND(78)

不存在的URL引用的資源。

CURLE_SSH(79)

未指定的錯誤發生在SSH會話。

CURLE_SSL_SHUTDOWN_FAILED(80)

關閉SSL連線失敗。

CURLE_AGAIN(81)

Socket是沒有準備好傳送/接收等待,直到它準備好了,然後再試一次。此返回程式碼僅返回從 curl_easy_recv(3)  和  (3) 加入7.18.2 curl_easy_send),

CURLE_SSL_CRL_BADFILE(82)

無法載入CRL檔案(在7.19.0版加入)

CURLE_SSL_ISSUER_ERROR(83)

發行人檢查失敗(在7.19.0版加入)

CURLE_FTP_PRET_FAILED(84)

FTP伺服器不理解的PRET命令,所有不支援給定的引數。要小心時usingCURLOPT_CUSTOMREQUEST,自定義列表“命令將傳送PRET CMD前PASV以及。(新增在7.20.0)

CURLE_RTSP_CSEQ_ERROR(85)

RTSP的Cseq號碼不匹配。

CURLE_RTSP_SESSION_ERROR(86)

RTSP會話識別符號不匹配。

CURLE_FTP_BAD_FILE_LIST(87)

無法,解析FTP檔案列表(在FTP萬用字元下載)。

CURLE_CHUNK_FAILED(88)

塊回撥報告錯誤。

CURLE_OBSOLETE *

這些錯誤程式碼永遠不會返回。它們被用來在一個老的libcurl版本,當前未使用。 

分享到: