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

CURLMcode

354       This is the generic return code used by functions in the libcurl  multi
355       interface. Also consider curl_multi_strerror(3).
356
357       CURLM_CALL_MULTI_PERFORM (-1)
358              This   is  not  really  an  error.  It  means  you  should  call
359              curl_multi_perform(3) again without doing select() or similar in
360              between.  Before  version  7.20.0  this  could  be  returned  by
361              curl_multi_perform(3), but in later versions this return code is
362              never used.
363
364       CURLM_OK (0)
365              Things are fine.
366
367       CURLM_BAD_HANDLE (1)
368              The passed-in handle is not a valid CURLM handle.
369
370       CURLM_BAD_EASY_HANDLE (2)
371              An  easy  handle was not good/valid. It could mean that it isn't
372              an easy handle at all, or possibly that the handle already is in
373              used by this or another multi handle.
374
375       CURLM_OUT_OF_MEMORY (3)
376              You are doomed.
377
378       CURLM_INTERNAL_ERROR (4)
379              This  can  only be returned if libcurl bugs. Please report it to
380              us!
381
382       CURLM_BAD_SOCKET (5)
383              The passed-in socket is not a valid  one  that  libcurl  already
384              knows about.  (Added in 7.15.4)
385
386       CURLM_UNKNOWN_OPTION (6)
387              curl_multi_setopt() with unsupported option (Added in 7.15.4)
388
389       CURLM_ADDED_ALREADY (7)
390              An  easy handle already added to a multi handle was attempted to
391              get added a second time. (Added in 7.32.1)
392
393       CURLM_RECURSIVE_API_CALL (8)
394              An API function was called from inside a callback.
395

CURLSHcode

397       The "share" interface will return a  CURLSHcode  to  indicate  when  an
398       error has occurred.  Also consider curl_share_strerror(3).
399
400       CURLSHE_OK (0)
401              All fine. Proceed as usual.
402
403       CURLSHE_BAD_OPTION (1)
404              An invalid option was passed to the function.
405
406       CURLSHE_IN_USE (2)
407              The share object is currently in use.
408
409       CURLSHE_INVALID (3)
410              An invalid share object was passed to the function.
411
412       CURLSHE_NOMEM (4)
413              Not enough memory was available.  (Added in 7.12.0)
414
415       CURLSHE_NOT_BUILT_IN (5)
416              The  requested sharing could not be done because the library you
417              use don't  have  that  particular  feature  enabled.  (Added  in
418              7.23.0)
419

SEE ALSO

421       curl_easy_strerror(3),  curl_multi_strerror(3), curl_share_strerror(3),
422       CURLOPT_ERRORBUFFER(3), CURLOPT_VERBOSE(3), CURLOPT_DEBUGFUNCTION(3)
423
424
425
426libcurl 7.61.1                 February 10, 2018             libcurl-errors(3)
Impressum