1libcurl-errors(3) libcurl errors libcurl-errors(3)
2
3
4
6 libcurl-errors - error codes in libcurl
7
9 This man page includes most, if not all, available error codes in
10 libcurl. Why they occur and possibly what you can do to fix the prob‐
11 lem are also included.
12
14 Almost all "easy" interface functions return a CURLcode error code. No
15 matter what, using the curl_easy_setopt(3) option CURLOPT_ERRORBUFFER
16 is a good idea as it will give you a human readable error string that
17 may offer more details about the cause of the error than just the error
18 code. curl_easy_strerror(3) can be called to get an error string from
19 a given CURLcode number.
20
21 CURLcode is one of the following:
22
23 CURLE_OK (0)
24 All fine. Proceed as usual.
25
26 CURLE_UNSUPPORTED_PROTOCOL (1)
27 The URL you passed to libcurl used a protocol that this libcurl
28 does not support. The support might be a compile-time option
29 that you didn't use, it can be a misspelled protocol string or
30 just a protocol libcurl has no code for.
31
32 CURLE_FAILED_INIT (2)
33 Very early initialization code failed. This is likely to be an
34 internal error or problem, or a resource problem where something
35 fundamental couldn't get done at init time.
36
37 CURLE_URL_MALFORMAT (3)
38 The URL was not properly formatted.
39
40 CURLE_NOT_BUILT_IN (4)
41 A requested feature, protocol or option was not found built-in
42 in this libcurl due to a build-time decision. This means that a
43 feature or option was not enabled or explicitly disabled when
44 libcurl was built and in order to get it to function you have to
45 get a rebuilt libcurl.
46
47 CURLE_COULDNT_RESOLVE_PROXY (5)
48 Couldn't resolve proxy. The given proxy host could not be
49 resolved.
50
51 CURLE_COULDNT_RESOLVE_HOST (6)
52 Couldn't resolve host. The given remote host was not resolved.
53
54 CURLE_COULDNT_CONNECT (7)
55 Failed to connect() to host or proxy.
56
57 CURLE_FTP_WEIRD_SERVER_REPLY (8)
58 After connecting to a FTP server, libcurl expects to get a cer‐
59 tain reply back. This error code implies that it got a strange
60 or bad reply. The given remote server is probably not an OK FTP
61 server.
62
63 CURLE_REMOTE_ACCESS_DENIED (9)
64 We were denied access to the resource given in the URL. For
65 FTP, this occurs while trying to change to the remote directory.
66
67 CURLE_FTP_ACCEPT_FAILED (10)
68 While waiting for the server to connect back when an active FTP
69 session is used, an error code was sent over the control connec‐
70 tion or similar.
71
72 CURLE_FTP_WEIRD_PASS_REPLY (11)
73 After having sent the FTP password to the server, libcurl
74 expects a proper reply. This error code indicates that an unex‐
75 pected code was returned.
76
77 CURLE_FTP_ACCEPT_TIMEOUT (12)
78 During an active FTP session while waiting for the server to
79 connect, the CURLOPT_ACCEPTTIMOUT_MS (or the internal default)
80 timeout expired.
81
82 CURLE_FTP_WEIRD_PASV_REPLY (13)
83 libcurl failed to get a sensible result back from the server as
84 a response to either a PASV or a EPSV command. The server is
85 flawed.
86
87 CURLE_FTP_WEIRD_227_FORMAT (14)
88 FTP servers return a 227-line as a response to a PASV command.
89 If libcurl fails to parse that line, this return code is passed
90 back.
91
92 CURLE_FTP_CANT_GET_HOST (15)
93 An internal failure to lookup the host used for the new connec‐
94 tion.
95
96 CURLE_FTP_COULDNT_SET_TYPE (17)
97 Received an error when trying to set the transfer mode to binary
98 or ASCII.
99
100 CURLE_PARTIAL_FILE (18)
101 A file transfer was shorter or larger than expected. This hap‐
102 pens when the server first reports an expected transfer size,
103 and then delivers data that doesn't match the previously given
104 size.
105
106 CURLE_FTP_COULDNT_RETR_FILE (19)
107 This was either a weird reply to a 'RETR' command or a zero byte
108 transfer complete.
109
110 CURLE_QUOTE_ERROR (21)
111 When sending custom "QUOTE" commands to the remote server, one
112 of the commands returned an error code that was 400 or higher
113 (for FTP) or otherwise indicated unsuccessful completion of the
114 command.
115
116 CURLE_HTTP_RETURNED_ERROR (22)
117 This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP
118 server returns an error code that is >= 400.
119
120 CURLE_WRITE_ERROR (23)
121 An error occurred when writing received data to a local file, or
122 an error was returned to libcurl from a write callback.
123
124 CURLE_UPLOAD_FAILED (25)
125 Failed starting the upload. For FTP, the server typically denied
126 the STOR command. The error buffer usually contains the server's
127 explanation for this.
128
129 CURLE_READ_ERROR (26)
130 There was a problem reading a local file or an error returned by
131 the read callback.
132
133 CURLE_OUT_OF_MEMORY (27)
134 A memory allocation request failed. This is serious badness and
135 things are severely screwed up if this ever occurs.
136
137 CURLE_OPERATION_TIMEDOUT (28)
138 Operation timeout. The specified time-out period was reached
139 according to the conditions.
140
141 CURLE_FTP_PORT_FAILED (30)
142 The FTP PORT command returned error. This mostly happens when
143 you haven't specified a good enough address for libcurl to use.
144 See CURLOPT_FTPPORT.
145
146 CURLE_FTP_COULDNT_USE_REST (31)
147 The FTP REST command returned error. This should never happen if
148 the server is sane.
149
150 CURLE_RANGE_ERROR (33)
151 The server does not support or accept range requests.
152
153 CURLE_HTTP_POST_ERROR (34)
154 This is an odd error that mainly occurs due to internal confu‐
155 sion.
156
157 CURLE_SSL_CONNECT_ERROR (35)
158 A problem occurred somewhere in the SSL/TLS handshake. You
159 really want the error buffer and read the message there as it
160 pinpoints the problem slightly more. Could be certificates (file
161 formats, paths, permissions), passwords, and others.
162
163 CURLE_BAD_DOWNLOAD_RESUME (36)
164 The download could not be resumed because the specified offset
165 was out of the file boundary.
166
167 CURLE_FILE_COULDNT_READ_FILE (37)
168 A file given with FILE:// couldn't be opened. Most likely
169 because the file path doesn't identify an existing file. Did you
170 check file permissions?
171
172 CURLE_LDAP_CANNOT_BIND (38)
173 LDAP cannot bind. LDAP bind operation failed.
174
175 CURLE_LDAP_SEARCH_FAILED (39)
176 LDAP search failed.
177
178 CURLE_FUNCTION_NOT_FOUND (41)
179 Function not found. A required zlib function was not found.
180
181 CURLE_ABORTED_BY_CALLBACK (42)
182 Aborted by callback. A callback returned "abort" to libcurl.
183
184 CURLE_BAD_FUNCTION_ARGUMENT (43)
185 Internal error. A function was called with a bad parameter.
186
187 CURLE_INTERFACE_FAILED (45)
188 Interface error. A specified outgoing interface could not be
189 used. Set which interface to use for outgoing connections'
190 source IP address with CURLOPT_INTERFACE.
191
192 CURLE_TOO_MANY_REDIRECTS (47)
193 Too many redirects. When following redirects, libcurl hit the
194 maximum amount. Set your limit with CURLOPT_MAXREDIRS.
195
196 CURLE_UNKNOWN_OPTION (48)
197 An option passed to libcurl is not recognized/known. Refer to
198 the appropriate documentation. This is most likely a problem in
199 the program that uses libcurl. The error buffer might contain
200 more specific information about which exact option it concerns.
201
202 CURLE_TELNET_OPTION_SYNTAX (49)
203 A telnet option string was Illegally formatted.
204
205 CURLE_PEER_FAILED_VERIFICATION (51)
206 The remote server's SSL certificate or SSH md5 fingerprint was
207 deemed not OK.
208
209 CURLE_GOT_NOTHING (52)
210 Nothing was returned from the server, and under the circum‐
211 stances, getting nothing is considered an error.
212
213 CURLE_SSL_ENGINE_NOTFOUND (53)
214 The specified crypto engine wasn't found.
215
216 CURLE_SSL_ENGINE_SETFAILED (54)
217 Failed setting the selected SSL crypto engine as default!
218
219 CURLE_SEND_ERROR (55)
220 Failed sending network data.
221
222 CURLE_RECV_ERROR (56)
223 Failure with receiving network data.
224
225 CURLE_SSL_CERTPROBLEM (58)
226 problem with the local client certificate.
227
228 CURLE_SSL_CIPHER (59)
229 Couldn't use specified cipher.
230
231 CURLE_SSL_CACERT (60)
232 Peer certificate cannot be authenticated with known CA certifi‐
233 cates.
234
235 CURLE_BAD_CONTENT_ENCODING (61)
236 Unrecognized transfer encoding.
237
238 CURLE_LDAP_INVALID_URL (62)
239 Invalid LDAP URL.
240
241 CURLE_FILESIZE_EXCEEDED (63)
242 Maximum file size exceeded.
243
244 CURLE_USE_SSL_FAILED (64)
245 Requested FTP SSL level failed.
246
247 CURLE_SEND_FAIL_REWIND (65)
248 When doing a send operation curl had to rewind the data to
249 retransmit, but the rewinding operation failed.
250
251 CURLE_SSL_ENGINE_INITFAILED (66)
252 Initiating the SSL Engine failed.
253
254 CURLE_LOGIN_DENIED (67)
255 The remote server denied curl to login (Added in 7.13.1)
256
257 CURLE_TFTP_NOTFOUND (68)
258 File not found on TFTP server.
259
260 CURLE_TFTP_PERM (69)
261 Permission problem on TFTP server.
262
263 CURLE_REMOTE_DISK_FULL (70)
264 Out of disk space on the server.
265
266 CURLE_TFTP_ILLEGAL (71)
267 Illegal TFTP operation.
268
269 CURLE_TFTP_UNKNOWNID (72)
270 Unknown TFTP transfer ID.
271
272 CURLE_REMOTE_FILE_EXISTS (73)
273 File already exists and will not be overwritten.
274
275 CURLE_TFTP_NOSUCHUSER (74)
276 This error should never be returned by a properly functioning
277 TFTP server.
278
279 CURLE_CONV_FAILED (75)
280 Character conversion failed.
281
282 CURLE_CONV_REQD (76)
283 Caller must register conversion callbacks.
284
285 CURLE_SSL_CACERT_BADFILE (77)
286 Problem with reading the SSL CA cert (path? access rights?)
287
288 CURLE_REMOTE_FILE_NOT_FOUND (78)
289 The resource referenced in the URL does not exist.
290
291 CURLE_SSH (79)
292 An unspecified error occurred during the SSH session.
293
294 CURLE_SSL_SHUTDOWN_FAILED (80)
295 Failed to shut down the SSL connection.
296
297 CURLE_AGAIN (81)
298 Socket is not ready for send/recv wait till it's ready and try
299 again. This return code is only returned from curl_easy_recv(3)
300 and curl_easy_send(3) (Added in 7.18.2)
301
302 CURLE_SSL_CRL_BADFILE (82)
303 Failed to load CRL file (Added in 7.19.0)
304
305 CURLE_SSL_ISSUER_ERROR (83)
306 Issuer check failed (Added in 7.19.0)
307
308 CURLE_FTP_PRET_FAILED (84)
309 The FTP server does not understand the PRET command at all or
310 does not support the given argument. Be careful when using CUR‐
311 LOPT_CUSTOMREQUEST, a custom LIST command will be sent with PRET
312 CMD before PASV as well. (Added in 7.20.0)
313
314 CURLE_RTSP_CSEQ_ERROR (85)
315 Mismatch of RTSP CSeq numbers.
316
317 CURLE_RTSP_SESSION_ERROR (86)
318 Mismatch of RTSP Session Identifiers.
319
320 CURLE_FTP_BAD_FILE_LIST (87)
321 Unable to parse FTP file list (during FTP wildcard downloading).
322
323 CURLE_CHUNK_FAILED (88)
324 Chunk callback reported error.
325
326 CURLE_OBSOLETE*
327 These error codes will never be returned. They were used in an
328 old libcurl version and are currently unused.
329
331 This is the generic return code used by functions in the libcurl multi
332 interface. Also consider curl_multi_strerror(3).
333
334 CURLM_CALL_MULTI_PERFORM (-1)
335 This is not really an error. It means you should call
336 curl_multi_perform(3) again without doing select() or similar in
337 between. Before version 7.20.0 this could be returned by
338 curl_multi_perform(3), but in later versions this return code is
339 never used.
340
341 CURLM_OK (0)
342 Things are fine.
343
344 CURLM_BAD_HANDLE (1)
345 The passed-in handle is not a valid CURLM handle.
346
347 CURLM_BAD_EASY_HANDLE (2)
348 An easy handle was not good/valid. It could mean that it isn't
349 an easy handle at all, or possibly that the handle already is in
350 used by this or another multi handle.
351
352 CURLM_OUT_OF_MEMORY (3)
353 You are doomed.
354
355 CURLM_INTERNAL_ERROR (4)
356 This can only be returned if libcurl bugs. Please report it to
357 us!
358
359 CURLM_BAD_SOCKET (5)
360 The passed-in socket is not a valid one that libcurl already
361 knows about. (Added in 7.15.4)
362
363 CURLM_UNKNOWN_OPTION (6)
364 curl_multi_setopt() with unsupported option (Added in 7.15.4)
365
367 The "share" interface will return a CURLSHcode to indicate when an
368 error has occurred. Also consider curl_share_strerror(3).
369
370 CURLSHE_OK (0)
371 All fine. Proceed as usual.
372
373 CURLSHE_BAD_OPTION (1)
374 An invalid option was passed to the function.
375
376 CURLSHE_IN_USE (2)
377 The share object is currently in use.
378
379 CURLSHE_INVALID (3)
380 An invalid share object was passed to the function.
381
382 CURLSHE_NOMEM (4)
383 Not enough memory was available. (Added in 7.12.0)
384
385 CURLSHE_NOT_BUILT_IN (5)
386 The requested sharing could not be done because the library you
387 use don't have that particular feature enabled. (Added in
388 7.23.0)
389
390
391
392libcurl 7.20.0 1 Jan 2010 libcurl-errors(3)