1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" * $Id: libcurl-errors.3,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
22 .\" **************************************************************************
24 .TH libcurl-errors 3 "8 Jun 2008" "libcurl 7.19.0" "libcurl errors"
26 libcurl-errors \- error codes in libcurl
28 This man page includes most, if not all, available error codes in libcurl.
29 Why they occur and possibly what you can do to fix the problem.
31 Almost all "easy" interface functions return a CURLcode error code. No matter
32 what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
33 a good idea as it will give you a human readable error string that may offer
34 more details about the error cause than just the error code
35 does. \fIcurl_easy_strerror(3)\fP can be called to get an error string from a
36 given CURLcode number.
38 CURLcode is one of the following:
40 All fine. Proceed as usual.
41 .IP "CURLE_UNSUPPORTED_PROTOCOL (1)"
42 The URL you passed to libcurl used a protocol that this libcurl does not
43 support. The support might be a compile-time option that you didn't use, it
44 can be a misspelled protocol string or just a protocol libcurl has no code
46 .IP "CURLE_FAILED_INIT (2)"
47 Very early initialization code failed. This is likely to be an internal error
49 .IP "CURLE_URL_MALFORMAT (3)"
50 The URL was not properly formatted.
51 .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
52 Couldn't resolve proxy. The given proxy host could not be resolved.
53 .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
54 Couldn't resolve host. The given remote host was not resolved.
55 .IP "CURLE_COULDNT_CONNECT (7)"
56 Failed to connect() to host or proxy.
57 .IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
58 After connecting to an FTP server, libcurl expects to get a certain reply
59 back. This error code implies that it got a strange or bad reply. The given
60 remote server is probably not an OK FTP server.
61 .IP "CURLE_REMOTE_ACCESS_DENIED (9)"
62 We were denied access to the resource given in the URL. For FTP, this occurs
63 while trying to change to the remote directory.
64 .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
65 After having sent the FTP password to the server, libcurl expects a proper
66 reply. This error code indicates that an unexpected code was returned.
67 .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
68 libcurl failed to get a sensible result back from the server as a response to
69 either a PASV or a EPSV command. The server is flawed.
70 .IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
71 FTP servers return a 227-line as a response to a PASV command. If libcurl
72 fails to parse that line, this return code is passed back.
73 .IP "CURLE_FTP_CANT_GET_HOST (15)"
74 An internal failure to lookup the host used for the new connection.
75 .IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
76 Received an error when trying to set the transfer mode to binary or ascii.
77 .IP "CURLE_PARTIAL_FILE (18)"
78 A file transfer was shorter or larger than expected. This happens when the
79 server first reports an expected transfer size, and then delivers data that
80 doesn't match the previously given size.
81 .IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
82 This was either a weird reply to a 'RETR' command or a zero byte transfer
84 .IP "CURLE_QUOTE_ERROR (21)"
85 When sending custom "QUOTE" commands to the remote server, one of the commands
86 returned an error code that was 400 or higher (for FTP) or otherwise
87 indicated unsuccessful completion of the command.
88 .IP "CURLE_HTTP_RETURNED_ERROR (22)"
89 This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
90 returns an error code that is >= 400. (This error code was formerly known as
91 CURLE_HTTP_NOT_FOUND.)
92 .IP "CURLE_WRITE_ERROR (23)"
93 An error occurred when writing received data to a local file, or an error was
94 returned to libcurl from a write callback.
95 .IP "CURLE_UPLOAD_FAILED (25)"
96 Failed starting the upload. For FTP, the server typically denied the STOR
97 command. The error buffer usually contains the server's explanation to this.
98 (This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
99 .IP "CURLE_READ_ERROR (26)"
100 There was a problem reading a local file or an error returned by the read
102 .IP "CURLE_OUT_OF_MEMORY (27)"
103 A memory allocation request failed. This is serious badness and
104 things are severely screwed up if this ever occur.
105 .IP "CURLE_OPERATION_TIMEDOUT (28)"
106 Operation timeout. The specified time-out period was reached according to the
108 .IP "CURLE_FTP_PORT_FAILED (30)"
109 The FTP PORT command returned error. This mostly happen when you haven't
110 specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
111 .IP "CURLE_FTP_COULDNT_USE_REST (31)"
112 The FTP REST command returned error. This should never happen if the server is
114 .IP "CURLE_RANGE_ERROR (33)"
115 The server does not support or accept range requests.
116 .IP "CURLE_HTTP_POST_ERROR (34)"
117 This is an odd error that mainly occurs due to internal confusion.
118 .IP "CURLE_SSL_CONNECT_ERROR (35)"
119 A problem occurred somewhere in the SSL/TLS handshake. You really want the
120 error buffer and read the message there as it pinpoints the problem slightly
121 more. Could be certificates (file formats, paths, permissions), passwords, and
123 .IP "CURLE_FTP_BAD_DOWNLOAD_RESUME (36)"
124 Attempting FTP resume beyond file size.
125 .IP "CURLE_FILE_COULDNT_READ_FILE (37)"
126 A file given with FILE:// couldn't be opened. Most likely because the file
127 path doesn't identify an existing file. Did you check file permissions?
128 .IP "CURLE_LDAP_CANNOT_BIND (38)"
129 LDAP cannot bind. LDAP bind operation failed.
130 .IP "CURLE_LDAP_SEARCH_FAILED (39)"
132 .IP "CURLE_FUNCTION_NOT_FOUND (41)"
133 Function not found. A required zlib function was not found.
134 .IP "CURLE_ABORTED_BY_CALLBACK (42)"
135 Aborted by callback. A callback returned "abort" to libcurl.
136 .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
137 Internal error. A function was called with a bad parameter.
138 .IP "CURLE_INTERFACE_FAILED (45)"
139 Interface error. A specified outgoing interface could not be used. Set which
140 interface to use for outgoing connections' source IP address with
141 CURLOPT_INTERFACE. (This error code was formerly known as
142 CURLE_HTTP_PORT_FAILED.)
143 .IP "CURLE_TOO_MANY_REDIRECTS (47)"
144 Too many redirects. When following redirects, libcurl hit the maximum amount.
145 Set your limit with CURLOPT_MAXREDIRS.
146 .IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
147 An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
148 the appropriate documentation.
149 .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
150 A telnet option string was Illegally formatted.
151 .IP "CURLE_PEER_FAILED_VERIFICATION (51)"
152 The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
153 .IP "CURLE_GOT_NOTHING (52)"
154 Nothing was returned from the server, and under the circumstances, getting
155 nothing is considered an error.
156 .IP "CURLE_SSL_ENGINE_NOTFOUND (53)"
157 The specified crypto engine wasn't found.
158 .IP "CURLE_SSL_ENGINE_SETFAILED (54)"
159 Failed setting the selected SSL crypto engine as default!
160 .IP "CURLE_SEND_ERROR (55)"
161 Failed sending network data.
162 .IP "CURLE_RECV_ERROR (56)"
163 Failure with receiving network data.
164 .IP "CURLE_SSL_CERTPROBLEM (58)"
165 problem with the local client certificate
166 .IP "CURLE_SSL_CIPHER (59)"
167 Couldn't use specified cipher
168 .IP "CURLE_SSL_CACERT (60)"
169 Peer certificate cannot be authenticated with known CA certificates
170 .IP "CURLE_BAD_CONTENT_ENCODING (61)"
171 Unrecognized transfer encoding
172 .IP "CURLE_LDAP_INVALID_URL (62)"
174 .IP "CURLE_FILESIZE_EXCEEDED (63)"
175 Maximum file size exceeded
176 .IP "CURLE_USE_SSL_FAILED (64)"
177 Requested FTP SSL level failed
178 .IP "CURLE_SEND_FAIL_REWIND (65)"
179 When doing a send operation curl had to rewind the data to retransmit, but the
180 rewinding operation failed
181 .IP "CURLE_SSL_ENGINE_INITFAILED (66)"
182 Initiating the SSL Engine failed
183 .IP "CURLE_LOGIN_DENIED (67)"
184 The remote server denied curl to login (Added in 7.13.1)
185 .IP "CURLE_TFTP_NOTFOUND (68)"
186 File not found on TFTP server
187 .IP "CURLE_TFTP_PERM (69)"
188 Permission problem on TFTP server
189 .IP "CURLE_REMOTE_DISK_FULL (70)"
190 Out of disk space on the server
191 .IP "CURLE_TFTP_ILLEGAL (71)"
192 Illegal TFTP operation
193 .IP "CURLE_TFTP_UNKNOWNID (72)"
194 Unknown TFTP transfer ID
195 .IP "CURLE_REMOTE_FILE_EXISTS (73)"
196 File already exists and will not be overwritten
197 .IP "CURLE_TFTP_NOSUCHUSER (74)"
198 This error should never be returned by a properly functioning TFTP server
199 .IP "CURLE_CONV_FAILED (75)"
200 Character conversion failed
201 .IP "CURLE_CONV_REQD (76)"
202 Caller must register conversion callbacks
203 .IP "CURLE_SSL_CACERT_BADFILE (77)"
204 Problem with reading the SSL CA cert (path? access rights?)
205 .IP "CURLE_REMOTE_FILE_NOT_FOUND (78)"
206 The resource referenced in the URL does not exist
208 An unspecified error occurred during the SSH session
209 .IP "CURLE_SSL_SHUTDOWN_FAILED (80)"
210 Failed to shut down the SSL connection
211 .IP "CURLE_AGAIN (81)"
212 Socket is not ready for send/recv wait till it's ready and try again. This
213 return code is only returned from \fIcurl_easy_recv(3)\fP and
214 \fIcurl_easy_send(3)\fP (Added in 7.18.2)
215 .IP "CURLE_SSL_CRL_BADFILE (82)"
216 Failed to load CRL file (Added in 7.19.0)
217 .IP "CURLE_SSL_ISSUER_ERROR (83)"
218 Issuer check failed (Added in 7.19.0)
219 .IP "CURLE_OBSOLETE*"
220 These error codes will never be returned. They used to be used in an old libcurl
221 version and are currently unused.
223 This is the generic return code used by functions in the libcurl multi
224 interface. Also consider \fIcurl_multi_strerror(3)\fP.
225 .IP "CURLM_CALL_MULTI_PERFORM (-1)"
226 This is not really an error. It means you should call
227 \fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
230 .IP "CURLM_BAD_HANDLE (1)"
231 The passed-in handle is not a valid CURLM handle.
232 .IP "CURLM_BAD_EASY_HANDLE (2)"
233 An easy handle was not good/valid. It could mean that it isn't an easy handle
234 at all, or possibly that the handle already is in used by this or another
236 .IP "CURLM_OUT_OF_MEMORY (3)"
238 .IP "CURLM_INTERNAL_ERROR (4)"
239 This can only be returned if libcurl bugs. Please report it to us!
240 .IP "CURLM_BAD_SOCKET (5)"
241 The passed-in socket is not a valid one that libcurl already knows about.
243 .IP "CURLM_UNKNOWN_OPTION (6)"
244 curl_multi_setopt() with unsupported option
247 The "share" interface will return a CURLSHcode to indicate when an error has
248 occurred. Also consider \fIcurl_share_strerror(3)\fP.
250 All fine. Proceed as usual.
251 .IP "CURLSHE_BAD_OPTION (1)"
252 An invalid option was passed to the function.
253 .IP "CURLSHE_IN_USE (2)"
254 The share object is currently in use.
255 .IP "CURLSHE_INVALID (3)"
256 An invalid share object was passed to the function.
257 .IP "CURLSHE_NOMEM (4)"
258 Not enough memory was available.