Post Reads 139 reads

Below is the list of all CURL errors and the reasons behind these errors.

CURL error code 0 – CURLE_OK (0) CURL error code 0 – CURLE_OK (0)

All fine. Proceed as usual.

CURL error code 1 – CURLE_UNSUPPORTED_PROTOCOL (1) CURL error code 1 – CURLE_UNSUPPORTED_PROTOCOL (1)

The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn’t use, it can be a misspelled protocol string or just a protocol libcurl has no code for.

CURL error code 2 – CURLE_FAILED_INIT (2) CURL error code 2 – CURLE_FAILED_INIT (2)

Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn’t get done at init time.

CURL error code 3 – CURLE_URL_MALFORMAT (3) CURL error code 3 – CURLE_URL_MALFORMAT (3)

The URL was not properly formatted.

CURL error code 4 – CURLE_NOT_BUILT_IN (4) CURL error code 4 – CURLE_NOT_BUILT_IN (4)

A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl.

CURL error code 5 – CURLE_COULDNT_RESOLVE_PROXY (5) CURL error code 5 – CURLE_COULDNT_RESOLVE_PROXY (5)

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

CURL error code 6 – CURLE_COULDNT_RESOLVE_HOST (6) CURL error code 6 – CURLE_COULDNT_RESOLVE_HOST (6)

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

CURL error code 7 – CURLE_COULDNT_CONNECT (7) CURL error code 7 – CURLE_COULDNT_CONNECT (7)

Failed to connect() to host or proxy.

CURL error code 8 – CURLE_WEIRD_SERVER_REPLY (8) CURL error code 8 – CURLE_WEIRD_SERVER_REPLY (8)

The server sent data libcurl couldn’t parse. This error code was known as as CURLE_FTP_WEIRD_SERVER_REPLY before 7.51.0.

CURL error code 9 – CURLE_REMOTE_ACCESS_DENIED (9) CURL error code 9 – CURLE_REMOTE_ACCESS_DENIED (9)

We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.

CURL error code 10 – CURLE_FTP_ACCEPT_FAILED (10) CURL error code 10 – CURLE_FTP_ACCEPT_FAILED (10)

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.

CURL error code 11 – CURLE_FTP_WEIRD_PASS_REPLY (11) CURL error code 11 – CURLE_FTP_WEIRD_PASS_REPLY (11)

After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.

CURL error code 12 – CURLE_FTP_ACCEPT_TIMEOUT (12) CURL error code 12 – CURLE_FTP_ACCEPT_TIMEOUT (12)

During an active FTP session while waiting for the server to connect, the CURLOPT_ACCEPTTIMEOUT_MS (or the internal default) timeout expired.

CURL error code 13 – CURLE_FTP_WEIRD_PASV_REPLY (13) CURL error code 13 – CURLE_FTP_WEIRD_PASV_REPLY (13)

libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.

CURL error code 14 – CURLE_FTP_WEIRD_227_FORMAT (14) CURL error code 14 – CURLE_FTP_WEIRD_227_FORMAT (14)

FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back.

CURL error code 15 – CURLE_FTP_CANT_GET_HOST (15) CURL error code 15 – CURLE_FTP_CANT_GET_HOST (15)

An internal failure to lookup the host used for the new connection.

CURL error code 16 – CURLE_HTTP2 (16) CURL error code 16 – CURLE_HTTP2 (16)

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

CURL error code 17 – CURLE_FTP_COULDNT_SET_TYPE (17) CURL error code 17 – CURLE_FTP_COULDNT_SET_TYPE (17)

Received an error when trying to set the transfer mode to binary or ASCII.

CURL error code 18 – CURLE_PARTIAL_FILE (18) CURL error code 18 – CURLE_PARTIAL_FILE (18)

A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn’t match the previously given size.

CURL error code 19 – CURLE_FTP_COULDNT_RETR_FILE (19) CURL error code 19 – CURLE_FTP_COULDNT_RETR_FILE (19)

This was either a weird reply to a ‘RETR’ command or a zero byte transfer complete.

CURL error code 21 – CURLE_QUOTE_ERROR (21) CURL error code 21 – CURLE_QUOTE_ERROR (21)

When sending custom “QUOTE” commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.

CURL error code 22 – CURLE_HTTP_RETURNED_ERROR (22) CURL error code 22 – CURLE_HTTP_RETURNED_ERROR (22)

This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400.

CURL error code 23 – CURLE_WRITE_ERROR (23) CURL error code 23 – CURLE_WRITE_ERROR (23)

An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.

CURL error code 25 – CURLE_UPLOAD_FAILED (25) CURL error code 25 – CURLE_UPLOAD_FAILED (25)

Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server’s explanation for this.

CURL error code 26 – CURLE_READ_ERROR (26) CURL error code 26 – CURLE_READ_ERROR (26)

There was a problem reading a local file or an error returned by the read callback.

CURL error code 27 – CURLE_OUT_OF_MEMORY (27) CURL error code 27 – CURLE_OUT_OF_MEMORY (27)

A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.

CURL error code 28 – CURLE_OPERATION_TIMEDOUT (28) CURL error code 28 – CURLE_OPERATION_TIMEDOUT (28)

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

CURL error code 30 – CURLE_FTP_PORT_FAILED (30) CURL error code 30 – CURLE_FTP_PORT_FAILED (30)

The FTP PORT command returned error. This mostly happens when you haven’t specified a good enough address for libcurl to use. See CURLOPT_FTPPORT.

CURL error code 31 – CURLE_FTP_COULDNT_USE_REST (31) CURL error code 31 – CURLE_FTP_COULDNT_USE_REST (31)

The FTP REST command returned error. This should never happen if the server is sane.

CURL error code 33 – CURLE_RANGE_ERROR (33) CURL error code 33 – CURLE_RANGE_ERROR (33)

The server does not support or accept range requests.

CURL error code 34 – CURLE_HTTP_POST_ERROR (34) CURL error code 34 – CURLE_HTTP_POST_ERROR (34)

This is an odd error that mainly occurs due to internal confusion.

CURL error code 35 – CURLE_SSL_CONNECT_ERROR (35) CURL error code 35 – CURLE_SSL_CONNECT_ERROR (35)

A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.

CURL error code 36 – CURLE_BAD_DOWNLOAD_RESUME (36) CURL error code 36 – CURLE_BAD_DOWNLOAD_RESUME (36)

The download could not be resumed because the specified offset was out of the file boundary.

CURL error code 37 – CURLE_FILE_COULDNT_READ_FILE (37) CURL error code 37 – CURLE_FILE_COULDNT_READ_FILE (37)

A file given with FILE:// couldn’t be opened. Most likely because the file path doesn’t identify an existing file. Did you check file permissions?

CURL error code 38 – CURLE_LDAP_CANNOT_BIND (38) CURL error code 38 – CURLE_LDAP_CANNOT_BIND (38)

LDAP cannot bind. LDAP bind operation failed.

CURL error code 39 – CURLE_LDAP_SEARCH_FAILED (39) CURL error code 39 – CURLE_LDAP_SEARCH_FAILED (39)

LDAP search failed.

CURL error code 41 – CURLE_FUNCTION_NOT_FOUND (41) CURL error code 41 – CURLE_FUNCTION_NOT_FOUND (41)

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

CURL error code 42 – CURLE_ABORTED_BY_CALLBACK (42) CURL error code 42 – CURLE_ABORTED_BY_CALLBACK (42)

Aborted by callback. A callback returned “abort” to libcurl.

CURL error code 43 – CURLE_BAD_FUNCTION_ARGUMENT (43) CURL error code 43 – CURLE_BAD_FUNCTION_ARGUMENT (43)

A function was called with a bad parameter.

CURL error code 45 – CURLE_INTERFACE_FAILED (45) CURL error code 45 – CURLE_INTERFACE_FAILED (45)

Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections’ source IP address with CURLOPT_INTERFACE.

CURL error code 47 – CURLE_TOO_MANY_REDIRECTS (47) CURL error code 47 – CURLE_TOO_MANY_REDIRECTS (47)

Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS.

CURL error code 48 – CURLE_UNKNOWN_OPTION (48) CURL error code 48 – CURLE_UNKNOWN_OPTION (48)

An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns.

CURL error code 49 – CURLE_TELNET_OPTION_SYNTAX (49) CURL error code 49 – CURLE_TELNET_OPTION_SYNTAX (49)

A telnet option string was Illegally formatted.

CURL error code 52 – CURLE_GOT_NOTHING (52) CURL error code 52 – CURLE_GOT_NOTHING (52)

Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.

CURL error code 53 – CURLE_SSL_ENGINE_NOTFOUND (53) CURL error code 53 – CURLE_SSL_ENGINE_NOTFOUND (53)

The specified crypto engine wasn’t found.

CURL error code 54 – CURLE_SSL_ENGINE_SETFAILED (54) CURL error code 54 – CURLE_SSL_ENGINE_SETFAILED (54)

Failed setting the selected SSL crypto engine as default!

CURL error code 55 – CURLE_SEND_ERROR (55) CURL error code 55 – CURLE_SEND_ERROR (55)

Failed sending network data.

CURL error code 56 – CURLE_RECV_ERROR (56) CURL error code 56 – CURLE_RECV_ERROR (56)

Failure with receiving network data.

CURL error code 58 – CURLE_SSL_CERTPROBLEM (58) CURL error code 58 – CURLE_SSL_CERTPROBLEM (58)

problem with the local client certificate.

CURL error code 59 – CURLE_SSL_CIPHER (59) CURL error code 59 – CURLE_SSL_CIPHER (59)

Couldn’t use specified cipher.

CURL error code 60 – CURLE_PEER_FAILED_VERIFICATION (60) CURL error code 60 – CURLE_PEER_FAILED_VERIFICATION (60)

The remote server’s SSL certificate or SSH md5 fingerprint was deemed not OK. This error code has been unified with ## CURL error code – CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.

CURL error code 61 – CURLE_BAD_CONTENT_ENCODING (61) CURL error code 61 – CURLE_BAD_CONTENT_ENCODING (61)

Unrecognized transfer encoding.

CURL error code 62 – CURLE_LDAP_INVALID_URL (62) CURL error code 62 – CURLE_LDAP_INVALID_URL (62)

Invalid LDAP URL.

CURL error code 63 – CURLE_FILESIZE_EXCEEDED (63) CURL error code 63 – CURLE_FILESIZE_EXCEEDED (63)

Maximum file size exceeded.

CURL error code 64 – CURLE_USE_SSL_FAILED (64) CURL error code 64 – CURLE_USE_SSL_FAILED (64)

Requested FTP SSL level failed.

CURL error code 65 – CURLE_SEND_FAIL_REWIND (65) CURL error code 65 – CURLE_SEND_FAIL_REWIND (65)

When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed.

CURL error code 66 – CURLE_SSL_ENGINE_INITFAILED (66) CURL error code 66 – CURLE_SSL_ENGINE_INITFAILED (66)

Initiating the SSL Engine failed.

CURL error code 67 – CURLE_LOGIN_DENIED (67) CURL error code 67 – CURLE_LOGIN_DENIED (67)

The remote server denied curl to login (Added in 7.13.1)

CURL error code 68 – CURLE_TFTP_NOTFOUND (68) CURL error code 68 – CURLE_TFTP_NOTFOUND (68)

File not found on TFTP server.

CURL error code 69 – CURLE_TFTP_PERM (69) CURL error code 69 – CURLE_TFTP_PERM (69)

Permission problem on TFTP server.

CURL error code 70 – CURLE_REMOTE_DISK_FULL (70) CURL error code 70 – CURLE_REMOTE_DISK_FULL (70)

Out of disk space on the server.

CURL error code 71 – CURLE_TFTP_ILLEGAL (71) CURL error code 71 – CURLE_TFTP_ILLEGAL (71)

Illegal TFTP operation.

CURL error code 72 – CURLE_TFTP_UNKNOWNID (72) CURL error code 72 – CURLE_TFTP_UNKNOWNID (72)

Unknown TFTP transfer ID.

CURL error code 73 – CURLE_REMOTE_FILE_EXISTS (73) CURL error code 73 – CURLE_REMOTE_FILE_EXISTS (73)

File already exists and will not be overwritten.

CURL error code 74 – CURLE_TFTP_NOSUCHUSER (74) CURL error code 74 – CURLE_TFTP_NOSUCHUSER (74)

This error should never be returned by a properly functioning TFTP server.

CURL error code 75 – CURLE_CONV_FAILED (75) CURL error code 75 – CURLE_CONV_FAILED (75)

Character conversion failed.

CURL error code 76 – CURLE_CONV_REQD (76) CURL error code 76 – CURLE_CONV_REQD (76)

Caller must register conversion callbacks.

CURL error code 77 – CURLE_SSL_CACERT_BADFILE (77) CURL error code 77 – CURLE_SSL_CACERT_BADFILE (77)

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

CURL error code 78 – CURLE_REMOTE_FILE_NOT_FOUND (78) CURL error code 78 – CURLE_REMOTE_FILE_NOT_FOUND (78)

The resource referenced in the URL does not exist.

CURL error code 79 – CURLE_SSH (79) CURL error code 79 – CURLE_SSH (79)

An unspecified error occurred during the SSH session.

CURL error code 80 – CURLE_SSL_SHUTDOWN_FAILED (80) CURL error code 80 – CURLE_SSL_SHUTDOWN_FAILED (80)

Failed to shut down the SSL connection.

CURL error code 81 – CURLE_AGAIN (81) CURL error code 81 – CURLE_AGAIN (81)

Socket is not ready for send/recv wait till it’s ready and try again. This return code is only returned from curl_easy_recv and curl_easy_send (Added in 7.18.2)

CURL error code 82 – CURLE_SSL_CRL_BADFILE (82) CURL error code 82 – CURLE_SSL_CRL_BADFILE (82)

Failed to load CRL file (Added in 7.19.0)

CURL error code 83 – CURLE_SSL_ISSUER_ERROR (83) CURL error code 83 – CURLE_SSL_ISSUER_ERROR (83)

Issuer check failed (Added in 7.19.0)

CURL error code 84 – CURLE_FTP_PRET_FAILED (84) CURL error code 84 – CURLE_FTP_PRET_FAILED (84)

The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using CURLOPT_CUSTOMREQUEST, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0)

CURL error code 85 – CURLE_RTSP_CSEQ_ERROR (85) CURL error code 85 – CURLE_RTSP_CSEQ_ERROR (85)

Mismatch of RTSP CSeq numbers.

CURL error code 86 – CURLE_RTSP_SESSION_ERROR (86) CURL error code 86 – CURLE_RTSP_SESSION_ERROR (86)

Mismatch of RTSP Session Identifiers.

CURL error code 87 – CURLE_FTP_BAD_FILE_LIST (87) CURL error code 87 – CURLE_FTP_BAD_FILE_LIST (87)

Unable to parse FTP file list (during FTP wildcard downloading).

CURL error code 88 – CURLE_CHUNK_FAILED (88) CURL error code 88 – CURLE_CHUNK_FAILED (88)

Chunk callback reported error.

CURL error code 89 – CURLE_NO_CONNECTION_AVAILABLE (89) CURL error code 89 – CURLE_NO_CONNECTION_AVAILABLE (89)

(For internal use only, will never be returned by libcurl) No connection available, the session will be queued. (added in 7.30.0)

CURL error code 90 – CURLE_SSL_PINNEDPUBKEYNOTMATCH (90) CURL error code 90 – CURLE_SSL_PINNEDPUBKEYNOTMATCH (90)

Failed to match the pinned key specified with CURLOPT_PINNEDPUBLICKEY.

CURL error code 91 – CURLE_SSL_INVALIDCERTSTATUS (91) CURL error code 91 – CURLE_SSL_INVALIDCERTSTATUS (91)

Status returned failure when asked with CURLOPT_SSL_VERIFYSTATUS.

CURL error code 92 – CURLE_HTTP2_STREAM (92) CURL error code 92 – CURLE_HTTP2_STREAM (92)

Stream error in the HTTP/2 framing layer.

CURL error code 93 – CURLE_RECURSIVE_API_CALL (93) CURL error code 93 – CURLE_RECURSIVE_API_CALL (93)

An API function was called from inside a callback.

CURL error code 94 – CURLE_AUTH_ERROR (94) CURL error code 94 – CURLE_AUTH_ERROR (94)

An authentication function returned an error.

CURL error code 95 – CURLE_HTTP3 (95) CURL error code 95 – CURLE_HTTP3 (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 buffer for details.

CURL error code 96 – CURLE_QUIC_CONNECT_ERROR (96) CURL error code 96 – CURLE_QUIC_CONNECT_ERROR (96)

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

CURL error code * – CURLE_OBSOLETE* CURL error code * – CURLE_OBSOLETE*

These error codes will never be returned. They were used in an old libcurl version and are currently unused.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
%d bloggers like this: