Workflow Tools Control Yard

Home / Linux

curl error code lookup

Paste the error line that curl printed, such as curl: (60) and the message after it, or type its number. The page gives curl's own text for the code, the name libcurl uses for the same number, and what to check first. It reads the text in your browser.

The number in curl: (N)

curl ends with the result code of the transfer as its exit status, so curl: (60) in the output and an exit status of 60 in a script are the same error, which libcurl calls CURLE_PEER_FAILED_VERIFICATION. The words after the number are that run's own message and often say more than the code alone; the table gives curl's general text for each code. Run the command again with -v to see the headers curl sends and receives and what it does along the way.

First checks

CodeWhat to check
5The proxy's name did not resolve: check the proxy that curl was given with -x (--proxy) or by a proxy variable of the environment.
6The host name in the URL did not resolve: check its spelling and the DNS server this computer uses.
7Nothing accepted the connection on that address and port: check the port, that the service runs, and any firewall between.
22Only with --fail (-f): the server answered with an HTTP error, 400 or higher. Run again without --fail to see the page the server sent.
28A time limit ran out: --connect-timeout for the connection, --max-time for the whole transfer. Check that the host answers at all, then raise the limit if the transfer is slow.
35The TLS handshake failed. Read the words after the number: libcurl's documentation says the message pinpoints the problem, and names certificates, their files and passwords among the causes.
52The server sent no reply at all.
56Receiving data failed after the connection was made: the connection broke or was reset.
60The server's certificate was not accepted. The words after the number give OpenSSL's reason, such as unable to get local issuer certificate: look it up in the OpenSSL verify error lookup. If the server uses a private CA, give curl its certificate with --cacert; -k (--insecure) skips the check and makes the transfer insecure.

Exit codes

Every exit code curl documents, 87 of them. curl says the existing ones are meant never to change.

Codelibcurl namecurl's text
0CURLE_OKSuccess. The operation completed successfully according to the instructions.
1CURLE_UNSUPPORTED_PROTOCOLUnsupported protocol. This build of curl has no support for this protocol.
2CURLE_FAILED_INITFailed to initialize.
3CURLE_URL_MALFORMATURL malformed. The syntax was not correct.
4CURLE_NOT_BUILT_INA 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.
5CURLE_COULDNT_RESOLVE_PROXYCould not resolve proxy. The given proxy host could not be resolved.
6CURLE_COULDNT_RESOLVE_HOSTCould not resolve host. The given remote host could not be resolved.
7CURLE_COULDNT_CONNECTFailed to connect to host.
8CURLE_WEIRD_SERVER_REPLYWeird server reply. The server sent data curl could not parse.
9CURLE_REMOTE_ACCESS_DENIEDFTP 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 does not exist on the server.
10CURLE_FTP_ACCEPT_FAILEDFTP 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.
11CURLE_FTP_WEIRD_PASS_REPLYFTP weird PASS reply. curl could not parse the reply sent to the PASS request.
12CURLE_FTP_ACCEPT_TIMEOUTDuring an active FTP session while waiting for the server to connect back to curl, the timeout expired.
13CURLE_FTP_WEIRD_PASV_REPLYFTP weird PASV reply, curl could not parse the reply sent to the PASV request.
14CURLE_FTP_WEIRD_227_FORMATFTP weird 227 format. curl could not parse the 227-line the server sent.
15CURLE_FTP_CANT_GET_HOSTFTP cannot use host. Could not resolve the host IP we got in the 227-line.
16CURLE_HTTP2HTTP/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.
17CURLE_FTP_COULDNT_SET_TYPEFTP could not set binary. Could not change transfer method to binary.
18CURLE_PARTIAL_FILEPartial file. Only a part of the file was transferred.
19CURLE_FTP_COULDNT_RETR_FILEFTP could not download/access the given file, the RETR (or similar) command failed.
21CURLE_QUOTE_ERRORFTP quote error. A quote command returned error from the server.
22CURLE_HTTP_RETURNED_ERRORHTTP 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 --fail is used.
23CURLE_WRITE_ERRORWrite error. curl could not write data to a local file system or similar.
25CURLE_UPLOAD_FAILEDFailed starting the upload. For FTP, the server typically denied the STOR command.
26CURLE_READ_ERRORRead error. Various reading problems.
27CURLE_OUT_OF_MEMORYOut of memory. A memory allocation request failed.
28CURLE_OPERATION_TIMEDOUTOperation timeout. The specified time-out period was reached according to the conditions.
30CURLE_FTP_PORT_FAILEDFTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead.
31CURLE_FTP_COULDNT_USE_RESTFTP could not use REST. The REST command failed. This command is used for resumed FTP transfers.
33CURLE_RANGE_ERRORHTTP range error. The range "command" did not work.
34Obsolete in libcurlHTTP post error. Internal post-request generation error.
35CURLE_SSL_CONNECT_ERRORSSL connect error. The SSL handshaking failed.
36CURLE_BAD_DOWNLOAD_RESUMEBad download resume. Could not continue an earlier aborted download.
37CURLE_FILE_COULDNT_READ_FILEFILE could not read file. Failed to open the file. Permissions?
38CURLE_LDAP_CANNOT_BINDLDAP cannot bind. LDAP bind operation failed.
39CURLE_LDAP_SEARCH_FAILEDLDAP search failed.
41Obsolete in libcurlFunction not found. A required LDAP function was not found.
42CURLE_ABORTED_BY_CALLBACKAborted by callback. An application told curl to abort the operation.
43CURLE_BAD_FUNCTION_ARGUMENTInternal error. A function was called with a bad parameter.
45CURLE_INTERFACE_FAILEDInterface error. A specified outgoing interface could not be used.
47CURLE_TOO_MANY_REDIRECTSToo many redirects. When following redirects, curl hit the maximum amount.
48CURLE_UNKNOWN_OPTIONUnknown 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.
49CURLE_SETOPT_OPTION_SYNTAXMalformed telnet option.
52CURLE_GOT_NOTHINGThe server did not reply anything, which here is considered an error.
53CURLE_SSL_ENGINE_NOTFOUNDSSL crypto engine not found.
54CURLE_SSL_ENGINE_SETFAILEDCannot set SSL crypto engine as default.
55CURLE_SEND_ERRORFailed sending network data.
56CURLE_RECV_ERRORFailure in receiving network data.
58CURLE_SSL_CERTPROBLEMProblem with the local certificate.
59CURLE_SSL_CIPHERCould not use specified SSL cipher.
60CURLE_PEER_FAILED_VERIFICATIONPeer certificate cannot be authenticated with known CA certificates.
61CURLE_BAD_CONTENT_ENCODINGUnrecognized transfer encoding.
63CURLE_FILESIZE_EXCEEDEDMaximum file size exceeded.
64CURLE_USE_SSL_FAILEDRequested FTP SSL level failed.
65CURLE_SEND_FAIL_REWINDSending the data requires a rewind that failed.
66CURLE_SSL_ENGINE_INITFAILEDFailed to initialize SSL Engine.
67CURLE_LOGIN_DENIEDThe username, password, or similar was not accepted and curl failed to log in.
68CURLE_TFTP_NOTFOUNDFile not found on TFTP server.
69CURLE_TFTP_PERMPermission problem on TFTP server.
70CURLE_REMOTE_DISK_FULLOut of disk space on TFTP server.
71CURLE_TFTP_ILLEGALIllegal TFTP operation.
72CURLE_TFTP_UNKNOWNIDUnknown TFTP transfer ID.
73CURLE_REMOTE_FILE_EXISTSFile already exists (TFTP).
74CURLE_TFTP_NOSUCHUSERNo such user (TFTP).
77CURLE_SSL_CACERT_BADFILEProblem reading the SSL CA cert (path? access rights?).
78CURLE_REMOTE_FILE_NOT_FOUNDThe resource referenced in the URL does not exist.
79CURLE_SSHAn unspecified error occurred during the SSH session.
80CURLE_SSL_SHUTDOWN_FAILEDFailed to shut down the SSL connection.
82CURLE_SSL_CRL_BADFILECould not load CRL file, missing or wrong format (added in 7.19.0).
83CURLE_SSL_ISSUER_ERRORIssuer check failed (added in 7.19.0).
84CURLE_FTP_PRET_FAILEDThe FTP PRET command failed.
85CURLE_RTSP_CSEQ_ERRORMismatch of RTSP CSeq numbers.
86CURLE_RTSP_SESSION_ERRORMismatch of RTSP Session Identifiers.
87CURLE_FTP_BAD_FILE_LISTUnable to parse FTP file list.
88CURLE_CHUNK_FAILEDFTP chunk callback reported error.
89CURLE_NO_CONNECTION_AVAILABLENo connection available, the session is queued.
90CURLE_SSL_PINNEDPUBKEYNOTMATCHSSL public key does not match pinned public key.
91CURLE_SSL_INVALIDCERTSTATUSInvalid SSL certificate status.
92CURLE_HTTP2_STREAMStream error in HTTP/2 framing layer.
93CURLE_RECURSIVE_API_CALLAn API function was called from inside a callback.
94CURLE_AUTH_ERRORAn authentication function returned an error.
95CURLE_HTTP3A 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.
96CURLE_QUIC_CONNECT_ERRORQUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers.
97CURLE_PROXYProxy handshake error.
98CURLE_SSL_CLIENTCERTA client-side certificate is required to complete the TLS handshake.
99CURLE_UNRECOVERABLE_POLLPoll or select returned fatal error.
100CURLE_TOO_LARGEA value or data field grew larger than allowed.

Sources

More Linux tools