1libcurl-errors(3)               libcurl errors               libcurl-errors(3)
2
3
4

NAME

6       libcurl-errors - error codes in libcurl
7

DESCRIPTION

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

CURLcode

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.
35
36       CURLE_URL_MALFORMAT (3)
37              The URL was not properly formatted.
38
39       CURLE_COULDNT_RESOLVE_PROXY (5)
40              Couldn't resolve proxy.  The  given  proxy  host  could  not  be
41              resolved.
42
43       CURLE_COULDNT_RESOLVE_HOST (6)
44              Couldn't resolve host. The given remote host was not resolved.
45
46       CURLE_COULDNT_CONNECT (7)
47              Failed to connect() to host or proxy.
48
49       CURLE_FTP_WEIRD_SERVER_REPLY (8)
50              After  connecting to a FTP server, libcurl expects to get a cer‐
51              tain reply back. This error code implies that it got  a  strange
52              or  bad reply. The given remote server is probably not an OK FTP
53              server.
54
55       CURLE_REMOTE_ACCESS_DENIED (9)
56              We were denied access to the resource given  in  the  URL.   For
57              FTP, this occurs while trying to change to the remote directory.
58
59       CURLE_FTP_WEIRD_PASS_REPLY (11)
60              After  having  sent  the  FTP  password  to  the server, libcurl
61              expects a proper reply. This error code indicates that an  unex‐
62              pected code was returned.
63
64       CURLE_FTP_WEIRD_PASV_REPLY (13)
65              libcurl  failed to get a sensible result back from the server as
66              a response to either a PASV or a EPSV  command.  The  server  is
67              flawed.
68
69       CURLE_FTP_WEIRD_227_FORMAT (14)
70              FTP  servers  return a 227-line as a response to a PASV command.
71              If libcurl fails to parse that line, this return code is  passed
72              back.
73
74       CURLE_FTP_PRET_FAILED (84)
75              The  FTP  server  does not understand the PRET command at all or
76              does not support the given argument. Be careful when using  CUR‐
77              LOPT_CUSTOMREQUEST, a custom LIST command will be sent with PRET
78              CMD before PASV as well. (Added in 7.20.0)
79
80       CURLE_FTP_CANT_GET_HOST (15)
81              An internal failure to lookup the host used for the new  connec‐
82              tion.
83
84       CURLE_FTP_COULDNT_SET_TYPE (17)
85              Received an error when trying to set the transfer mode to binary
86              or ASCII.
87
88       CURLE_PARTIAL_FILE (18)
89              A file transfer was shorter or larger than expected.  This  hap‐
90              pens  when  the  server first reports an expected transfer size,
91              and then delivers data that doesn't match the  previously  given
92              size.
93
94       CURLE_FTP_COULDNT_RETR_FILE (19)
95              This was either a weird reply to a 'RETR' command or a zero byte
96              transfer complete.
97
98       CURLE_QUOTE_ERROR (21)
99              When sending custom "QUOTE" commands to the remote  server,  one
100              of  the  commands  returned an error code that was 400 or higher
101              (for FTP) or otherwise indicated unsuccessful completion of  the
102              command.
103
104       CURLE_HTTP_RETURNED_ERROR (22)
105              This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP
106              server returns an error code that is >= 400.
107
108       CURLE_WRITE_ERROR (23)
109              An error occurred when writing received data to a local file, or
110              an error was returned to libcurl from a write callback.
111
112       CURLE_UPLOAD_FAILED (25)
113              Failed starting the upload. For FTP, the server typically denied
114              the STOR command. The error buffer usually contains the server's
115              explanation for this.
116
117       CURLE_READ_ERROR (26)
118              There was a problem reading a local file or an error returned by
119              the read callback.
120
121       CURLE_OUT_OF_MEMORY (27)
122              A memory allocation request failed. This is serious badness  and
123              things are severely screwed up if this ever occurs.
124
125       CURLE_OPERATION_TIMEDOUT (28)
126              Operation  timeout.  The  specified  time-out period was reached
127              according to the conditions.
128
129       CURLE_FTP_PORT_FAILED (30)
130              The FTP PORT command returned error. This  mostly  happens  when
131              you  haven't specified a good enough address for libcurl to use.
132              See CURLOPT_FTPPORT.
133
134       CURLE_FTP_COULDNT_USE_REST (31)
135              The FTP REST command returned error. This should never happen if
136              the server is sane.
137
138       CURLE_RANGE_ERROR (33)
139              The server does not support or accept range requests.
140
141       CURLE_HTTP_POST_ERROR (34)
142              This  is  an odd error that mainly occurs due to internal confu‐
143              sion.
144
145       CURLE_SSL_CONNECT_ERROR (35)
146              A problem occurred  somewhere  in  the  SSL/TLS  handshake.  You
147              really  want  the  error buffer and read the message there as it
148              pinpoints the problem slightly more. Could be certificates (file
149              formats, paths, permissions), passwords, and others.
150
151       CURLE_BAD_DOWNLOAD_RESUME (36)
152              The  download  could not be resumed because the specified offset
153              was out of the file boundary.
154
155       CURLE_FILE_COULDNT_READ_FILE (37)
156              A file given  with  FILE://  couldn't  be  opened.  Most  likely
157              because the file path doesn't identify an existing file. Did you
158              check file permissions?
159
160       CURLE_LDAP_CANNOT_BIND (38)
161              LDAP cannot bind. LDAP bind operation failed.
162
163       CURLE_LDAP_SEARCH_FAILED (39)
164              LDAP search failed.
165
166       CURLE_FUNCTION_NOT_FOUND (41)
167              Function not found. A required zlib function was not found.
168
169       CURLE_ABORTED_BY_CALLBACK (42)
170              Aborted by callback. A callback returned "abort" to libcurl.
171
172       CURLE_BAD_FUNCTION_ARGUMENT (43)
173              Internal error. A function was called with a bad parameter.
174
175       CURLE_INTERFACE_FAILED (45)
176              Interface error. A specified outgoing  interface  could  not  be
177              used.  Set  which  interface  to  use  for outgoing connections'
178              source IP address with CURLOPT_INTERFACE.
179
180       CURLE_TOO_MANY_REDIRECTS (47)
181              Too many redirects. When following redirects,  libcurl  hit  the
182              maximum amount.  Set your limit with CURLOPT_MAXREDIRS.
183
184       CURLE_UNKNOWN_TELNET_OPTION (48)
185              An   option   set  with  CURLOPT_TELNETOPTIONS  was  not  recog‐
186              nized/known. Refer to the appropriate documentation.
187
188       CURLE_TELNET_OPTION_SYNTAX (49)
189              A telnet option string was Illegally formatted.
190
191       CURLE_PEER_FAILED_VERIFICATION (51)
192              The remote server's SSL certificate or SSH md5  fingerprint  was
193              deemed not OK.
194
195       CURLE_GOT_NOTHING (52)
196              Nothing  was  returned  from  the  server, and under the circum‐
197              stances, getting nothing is considered an error.
198
199       CURLE_SSL_ENGINE_NOTFOUND (53)
200              The specified crypto engine wasn't found.
201
202       CURLE_SSL_ENGINE_SETFAILED (54)
203              Failed setting the selected SSL crypto engine as default!
204
205       CURLE_SEND_ERROR (55)
206              Failed sending network data.
207
208       CURLE_RECV_ERROR (56)
209              Failure with receiving network data.
210
211       CURLE_SSL_CERTPROBLEM (58)
212              problem with the local client certificate.
213
214       CURLE_SSL_CIPHER (59)
215              Couldn't use specified cipher.
216
217       CURLE_SSL_CACERT (60)
218              Peer certificate cannot be authenticated with known CA  certifi‐
219              cates.
220
221       CURLE_BAD_CONTENT_ENCODING (61)
222              Unrecognized transfer encoding.
223
224       CURLE_LDAP_INVALID_URL (62)
225              Invalid LDAP URL.
226
227       CURLE_FILESIZE_EXCEEDED (63)
228              Maximum file size exceeded.
229
230       CURLE_USE_SSL_FAILED (64)
231              Requested FTP SSL level failed.
232
233       CURLE_SEND_FAIL_REWIND (65)
234              When  doing  a  send  operation  curl  had to rewind the data to
235              retransmit, but the rewinding operation failed.
236
237       CURLE_SSL_ENGINE_INITFAILED (66)
238              Initiating the SSL Engine failed.
239
240       CURLE_LOGIN_DENIED (67)
241              The remote server denied curl to login (Added in 7.13.1)
242
243       CURLE_TFTP_NOTFOUND (68)
244              File not found on TFTP server.
245
246       CURLE_TFTP_PERM (69)
247              Permission problem on TFTP server.
248
249       CURLE_REMOTE_DISK_FULL (70)
250              Out of disk space on the server.
251
252       CURLE_TFTP_ILLEGAL (71)
253              Illegal TFTP operation.
254
255       CURLE_TFTP_UNKNOWNID (72)
256              Unknown TFTP transfer ID.
257
258       CURLE_REMOTE_FILE_EXISTS (73)
259              File already exists and will not be overwritten.
260
261       CURLE_TFTP_NOSUCHUSER (74)
262              This error should never be returned by  a  properly  functioning
263              TFTP server.
264
265       CURLE_CONV_FAILED (75)
266              Character conversion failed.
267
268       CURLE_CONV_REQD (76)
269              Caller must register conversion callbacks.
270
271       CURLE_SSL_CACERT_BADFILE (77)
272              Problem with reading the SSL CA cert (path? access rights?)
273
274       CURLE_REMOTE_FILE_NOT_FOUND (78)
275              The resource referenced in the URL does not exist.
276
277       CURLE_SSH (79)
278              An unspecified error occurred during the SSH session.
279
280       CURLE_SSL_SHUTDOWN_FAILED (80)
281              Failed to shut down the SSL connection.
282
283       CURLE_AGAIN (81)
284              Socket  is  not ready for send/recv wait till it's ready and try
285              again. This return code is only returned from  curl_easy_recv(3)
286              and curl_easy_send(3) (Added in 7.18.2)
287
288       CURLE_SSL_CRL_BADFILE (82)
289              Failed to load CRL file (Added in 7.19.0)
290
291       CURLE_SSL_ISSUER_ERROR (83)
292              Issuer check failed (Added in 7.19.0)
293
294       CURLE_FTP_PRET_FAILED (84)
295              PRET command failed
296
297       CURLE_RTSP_CSEQ_ERROR (85)
298              Mismatch of RTSP CSeq numbers.
299
300       CURLE_RTSP_SESSION_ERROR (86)
301              Mismatch of RTSP Session Identifiers.
302
303       CURLE_FTP_BAD_FILE_LIST (87)
304              Unable to parse FTP file list (during FTP wildcard downloading).
305
306       CURLE_CHUNK_FAILED (88)
307              Chunk callback reported error.
308
309       CURLE_OBSOLETE*
310              These  error  codes will never be returned. They were used in an
311              old libcurl version and are currently unused.
312

CURLMcode

314       This is the generic return code used by functions in the libcurl  multi
315       interface. Also consider curl_multi_strerror(3).
316
317       CURLM_CALL_MULTI_PERFORM (-1)
318              This   is  not  really  an  error.  It  means  you  should  call
319              curl_multi_perform(3) again without doing select() or similar in
320              between.
321
322       CURLM_OK (0)
323              Things are fine.
324
325       CURLM_BAD_HANDLE (1)
326              The passed-in handle is not a valid CURLM handle.
327
328       CURLM_BAD_EASY_HANDLE (2)
329              An  easy  handle was not good/valid. It could mean that it isn't
330              an easy handle at all, or possibly that the handle already is in
331              used by this or another multi handle.
332
333       CURLM_OUT_OF_MEMORY (3)
334              You are doomed.
335
336       CURLM_INTERNAL_ERROR (4)
337              This  can  only be returned if libcurl bugs. Please report it to
338              us!
339
340       CURLM_BAD_SOCKET (5)
341              The passed-in socket is not a valid  one  that  libcurl  already
342              knows about.  (Added in 7.15.4)
343
344       CURLM_UNKNOWN_OPTION (6)
345              curl_multi_setopt() with unsupported option (Added in 7.15.4)
346

CURLSHcode

348       The  "share"  interface  will  return  a CURLSHcode to indicate when an
349       error has occurred.  Also consider curl_share_strerror(3).
350
351       CURLSHE_OK (0)
352              All fine. Proceed as usual.
353
354       CURLSHE_BAD_OPTION (1)
355              An invalid option was passed to the function.
356
357       CURLSHE_IN_USE (2)
358              The share object is currently in use.
359
360       CURLSHE_INVALID (3)
361              An invalid share object was passed to the function.
362
363       CURLSHE_NOMEM (4)
364              Not enough memory was available.  (Added in 7.12.0)
365
366
367
368libcurl 7.20.0                    1 Jan 2010                 libcurl-errors(3)
Impressum