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
| Code | What to check |
|---|---|
| 5 | The proxy's name did not resolve: check the proxy that curl was given with -x (--proxy) or by a proxy variable of the environment. |
| 6 | The host name in the URL did not resolve: check its spelling and the DNS server this computer uses. |
| 7 | Nothing accepted the connection on that address and port: check the port, that the service runs, and any firewall between. |
| 22 | Only with --fail (-f): the server answered with an HTTP error, 400 or higher. Run again without --fail to see the page the server sent. |
| 28 | A 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. |
| 35 | The 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. |
| 52 | The server sent no reply at all. |
| 56 | Receiving data failed after the connection was made: the connection broke or was reset. |
| 60 | The 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.
| Code | libcurl name | curl's text |
|---|---|---|
| 0 | CURLE_OK | Success. The operation completed successfully according to the instructions. |
| 1 | CURLE_UNSUPPORTED_PROTOCOL | Unsupported protocol. This build of curl has no support for this protocol. |
| 2 | CURLE_FAILED_INIT | Failed to initialize. |
| 3 | CURLE_URL_MALFORMAT | URL malformed. The syntax was not correct. |
| 4 | CURLE_NOT_BUILT_IN | 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 | CURLE_COULDNT_RESOLVE_PROXY | Could not resolve proxy. The given proxy host could not be resolved. |
| 6 | CURLE_COULDNT_RESOLVE_HOST | Could not resolve host. The given remote host could not be resolved. |
| 7 | CURLE_COULDNT_CONNECT | Failed to connect to host. |
| 8 | CURLE_WEIRD_SERVER_REPLY | Weird server reply. The server sent data curl could not parse. |
| 9 | CURLE_REMOTE_ACCESS_DENIED | 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 does not exist on the server. |
| 10 | CURLE_FTP_ACCEPT_FAILED | 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 | CURLE_FTP_WEIRD_PASS_REPLY | FTP weird PASS reply. curl could not parse the reply sent to the PASS request. |
| 12 | CURLE_FTP_ACCEPT_TIMEOUT | During an active FTP session while waiting for the server to connect back to curl, the timeout expired. |
| 13 | CURLE_FTP_WEIRD_PASV_REPLY | FTP weird PASV reply, curl could not parse the reply sent to the PASV request. |
| 14 | CURLE_FTP_WEIRD_227_FORMAT | FTP weird 227 format. curl could not parse the 227-line the server sent. |
| 15 | CURLE_FTP_CANT_GET_HOST | FTP cannot use host. Could not resolve the host IP we got in the 227-line. |
| 16 | CURLE_HTTP2 | 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 | CURLE_FTP_COULDNT_SET_TYPE | FTP could not set binary. Could not change transfer method to binary. |
| 18 | CURLE_PARTIAL_FILE | Partial file. Only a part of the file was transferred. |
| 19 | CURLE_FTP_COULDNT_RETR_FILE | FTP could not download/access the given file, the RETR (or similar) command failed. |
| 21 | CURLE_QUOTE_ERROR | FTP quote error. A quote command returned error from the server. |
| 22 | CURLE_HTTP_RETURNED_ERROR | 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 --fail is used. |
| 23 | CURLE_WRITE_ERROR | Write error. curl could not write data to a local file system or similar. |
| 25 | CURLE_UPLOAD_FAILED | Failed starting the upload. For FTP, the server typically denied the STOR command. |
| 26 | CURLE_READ_ERROR | Read error. Various reading problems. |
| 27 | CURLE_OUT_OF_MEMORY | Out of memory. A memory allocation request failed. |
| 28 | CURLE_OPERATION_TIMEDOUT | Operation timeout. The specified time-out period was reached according to the conditions. |
| 30 | CURLE_FTP_PORT_FAILED | FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead. |
| 31 | CURLE_FTP_COULDNT_USE_REST | FTP could not use REST. The REST command failed. This command is used for resumed FTP transfers. |
| 33 | CURLE_RANGE_ERROR | HTTP range error. The range "command" did not work. |
| 34 | Obsolete in libcurl | HTTP post error. Internal post-request generation error. |
| 35 | CURLE_SSL_CONNECT_ERROR | SSL connect error. The SSL handshaking failed. |
| 36 | CURLE_BAD_DOWNLOAD_RESUME | Bad download resume. Could not continue an earlier aborted download. |
| 37 | CURLE_FILE_COULDNT_READ_FILE | FILE could not read file. Failed to open the file. Permissions? |
| 38 | CURLE_LDAP_CANNOT_BIND | LDAP cannot bind. LDAP bind operation failed. |
| 39 | CURLE_LDAP_SEARCH_FAILED | LDAP search failed. |
| 41 | Obsolete in libcurl | Function not found. A required LDAP function was not found. |
| 42 | CURLE_ABORTED_BY_CALLBACK | Aborted by callback. An application told curl to abort the operation. |
| 43 | CURLE_BAD_FUNCTION_ARGUMENT | Internal error. A function was called with a bad parameter. |
| 45 | CURLE_INTERFACE_FAILED | Interface error. A specified outgoing interface could not be used. |
| 47 | CURLE_TOO_MANY_REDIRECTS | Too many redirects. When following redirects, curl hit the maximum amount. |
| 48 | CURLE_UNKNOWN_OPTION | 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 | CURLE_SETOPT_OPTION_SYNTAX | Malformed telnet option. |
| 52 | CURLE_GOT_NOTHING | The server did not reply anything, which here is considered an error. |
| 53 | CURLE_SSL_ENGINE_NOTFOUND | SSL crypto engine not found. |
| 54 | CURLE_SSL_ENGINE_SETFAILED | Cannot set SSL crypto engine as default. |
| 55 | CURLE_SEND_ERROR | Failed sending network data. |
| 56 | CURLE_RECV_ERROR | Failure in receiving network data. |
| 58 | CURLE_SSL_CERTPROBLEM | Problem with the local certificate. |
| 59 | CURLE_SSL_CIPHER | Could not use specified SSL cipher. |
| 60 | CURLE_PEER_FAILED_VERIFICATION | Peer certificate cannot be authenticated with known CA certificates. |
| 61 | CURLE_BAD_CONTENT_ENCODING | Unrecognized transfer encoding. |
| 63 | CURLE_FILESIZE_EXCEEDED | Maximum file size exceeded. |
| 64 | CURLE_USE_SSL_FAILED | Requested FTP SSL level failed. |
| 65 | CURLE_SEND_FAIL_REWIND | Sending the data requires a rewind that failed. |
| 66 | CURLE_SSL_ENGINE_INITFAILED | Failed to initialize SSL Engine. |
| 67 | CURLE_LOGIN_DENIED | The username, password, or similar was not accepted and curl failed to log in. |
| 68 | CURLE_TFTP_NOTFOUND | File not found on TFTP server. |
| 69 | CURLE_TFTP_PERM | Permission problem on TFTP server. |
| 70 | CURLE_REMOTE_DISK_FULL | Out of disk space on TFTP server. |
| 71 | CURLE_TFTP_ILLEGAL | Illegal TFTP operation. |
| 72 | CURLE_TFTP_UNKNOWNID | Unknown TFTP transfer ID. |
| 73 | CURLE_REMOTE_FILE_EXISTS | File already exists (TFTP). |
| 74 | CURLE_TFTP_NOSUCHUSER | No such user (TFTP). |
| 77 | CURLE_SSL_CACERT_BADFILE | Problem reading the SSL CA cert (path? access rights?). |
| 78 | CURLE_REMOTE_FILE_NOT_FOUND | The resource referenced in the URL does not exist. |
| 79 | CURLE_SSH | An unspecified error occurred during the SSH session. |
| 80 | CURLE_SSL_SHUTDOWN_FAILED | Failed to shut down the SSL connection. |
| 82 | CURLE_SSL_CRL_BADFILE | Could not load CRL file, missing or wrong format (added in 7.19.0). |
| 83 | CURLE_SSL_ISSUER_ERROR | Issuer check failed (added in 7.19.0). |
| 84 | CURLE_FTP_PRET_FAILED | The FTP PRET command failed. |
| 85 | CURLE_RTSP_CSEQ_ERROR | Mismatch of RTSP CSeq numbers. |
| 86 | CURLE_RTSP_SESSION_ERROR | Mismatch of RTSP Session Identifiers. |
| 87 | CURLE_FTP_BAD_FILE_LIST | Unable to parse FTP file list. |
| 88 | CURLE_CHUNK_FAILED | FTP chunk callback reported error. |
| 89 | CURLE_NO_CONNECTION_AVAILABLE | No connection available, the session is queued. |
| 90 | CURLE_SSL_PINNEDPUBKEYNOTMATCH | SSL public key does not match pinned public key. |
| 91 | CURLE_SSL_INVALIDCERTSTATUS | Invalid SSL certificate status. |
| 92 | CURLE_HTTP2_STREAM | Stream error in HTTP/2 framing layer. |
| 93 | CURLE_RECURSIVE_API_CALL | An API function was called from inside a callback. |
| 94 | CURLE_AUTH_ERROR | An authentication function returned an error. |
| 95 | CURLE_HTTP3 | 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 | CURLE_QUIC_CONNECT_ERROR | QUIC connection error. This error may be caused by an SSL library error. QUIC is the protocol used for HTTP/3 transfers. |
| 97 | CURLE_PROXY | Proxy handshake error. |
| 98 | CURLE_SSL_CLIENTCERT | A client-side certificate is required to complete the TLS handshake. |
| 99 | CURLE_UNRECOVERABLE_POLL | Poll or select returned fatal error. |
| 100 | CURLE_TOO_LARGE | A value or data field grew larger than allowed. |
Sources
- Exit codes and their texts: curl's documentation of its exit codes; libcurl names: libcurl-errors; options: the pages of
--cacert,--connect-timeout,--fail,--insecure,--max-time,--proxyand--verbose; the exit status: src/tool_main.c. All at curl 8.23.0 (tag curl-8_23_0). - curl's texts carry this notice: COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2026, Daniel Stenberg, <daniel@haxx.se>, and many contributors, see the THANKS file. All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
More Linux tools
-
Exit code, signal and errno lookup
Look up 137, 139, 143 or any other exit code, a signal such as SIGKILL, or an errno value such as 111.
-
OpenSSL verify errors and command builder
Read verify error:num=20 and the others in plain words, and build openssl commands for PFX, PEM and CSRs.
-
chmod and umask calculator
Turn 755 into rwxr-xr-x and back, build a chmod command, and see what a umask leaves on new files.
-
Cron expression explainer
Read a crontab line such as */15 8-18 * * 1-5 in words, see its next runs, or build a schedule.