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

CURLMcode

295       This  is the generic return code used by functions in the libcurl multi
296       interface. Also consider curl_multi_strerror(3).
297
298       CURLM_CALL_MULTI_PERFORM (-1)
299              This  is  not  really  an  error.  It  means  you  should   call
300              curl_multi_perform(3) again without doing select() or similar in
301              between.
302
303       CURLM_OK (0)
304              Things are fine.
305
306       CURLM_BAD_HANDLE (1)
307              The passed-in handle is not a valid CURLM handle.
308
309       CURLM_BAD_EASY_HANDLE (2)
310              An easy handle was not good/valid. It could mean that  it  isn't
311              an easy handle at all, or possibly that the handle already is in
312              used by this or another multi handle.
313
314       CURLM_OUT_OF_MEMORY (3)
315              You are doomed.
316
317       CURLM_INTERNAL_ERROR (4)
318              This can only be returned if libcurl bugs. Please report  it  to
319              us!
320
321       CURLM_BAD_SOCKET (5)
322              The  passed-in  socket  is  not a valid one that libcurl already
323              knows about.  (Added in 7.15.4)
324
325       CURLM_UNKNOWN_OPTION (6)
326              curl_multi_setopt() with unsupported option (Added in 7.15.4)
327

CURLSHcode

329       The "share" interface will return a  CURLSHcode  to  indicate  when  an
330       error has occurred.  Also consider curl_share_strerror(3).
331
332       CURLSHE_OK (0)
333              All fine. Proceed as usual.
334
335       CURLSHE_BAD_OPTION (1)
336              An invalid option was passed to the function.
337
338       CURLSHE_IN_USE (2)
339              The share object is currently in use.
340
341       CURLSHE_INVALID (3)
342              An invalid share object was passed to the function.
343
344       CURLSHE_NOMEM (4)
345              Not enough memory was available.  (Added in 7.12.0)
346
347
348
349libcurl 7.19.0                    8 Jun 2008                 libcurl-errors(3)
Impressum