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

CURLSHcode

345       The "share" interface will return a  CURLSHcode  to  indicate  when  an
346       error has occurred.  Also consider curl_share_strerror(3).
347
348       CURLSHE_OK (0)
349              All fine. Proceed as usual.
350
351       CURLSHE_BAD_OPTION (1)
352              An invalid option was passed to the function.
353
354       CURLSHE_IN_USE (2)
355              The share object is currently in use.
356
357       CURLSHE_INVALID (3)
358              An invalid share object was passed to the function.
359
360
361
362
363libcurl 7.16.3                    8 May 2007                 libcurl-errors(3)
Impressum