1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" * $Id: libcurl-errors.3,v 1.26 2007-05-08 11:34:31 bagder Exp $
22 .\" **************************************************************************
24 .TH libcurl-errors 3 "8 May 2007" "libcurl 7.16.3" "libcurl errors"
26 libcurl-errors \- error codes in libcurl
28 This man page includes most, if not all, available error codes in libcurl.
29 Why they occur and possibly what you can do to fix the problem.
31 Almost all "easy" interface functions return a CURLcode error code. No matter
32 what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
33 a good idea as it will give you a human readable error string that may offer
34 more details about the error cause than just the error code
35 does. \fIcurl_easy_strerror(3)\fP can be called to get an error string from a
36 given CURLcode number.
38 CURLcode is one of the following:
40 All fine. Proceed as usual.
41 .IP "CURLE_UNSUPPORTED_PROTOCOL (1)"
42 The URL you passed to libcurl used a protocol that this libcurl does not
43 support. The support might be a compile-time option that you didn't use, it
44 can be a misspelled protocol string or just a protocol libcurl has no code
46 .IP "CURLE_FAILED_INIT (2)"
47 Very early initialization code failed. This is likely to be an internal error
49 .IP "CURLE_URL_MALFORMAT (3)"
50 The URL was not properly formatted.
51 .IP "CURLE_URL_MALFORMAT_USER (4)"
52 This is never returned by current libcurl.
53 .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
54 Couldn't resolve proxy. The given proxy host could not be resolved.
55 .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
56 Couldn't resolve host. The given remote host was not resolved.
57 .IP "CURLE_COULDNT_CONNECT (7)"
58 Failed to connect() to host or proxy.
59 .IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
60 After connecting to an FTP server, libcurl expects to get a certain reply
61 back. This error code implies that it got a strange or bad reply. The given
62 remote server is probably not an OK FTP server.
63 .IP "CURLE_FTP_ACCESS_DENIED (9)"
64 We were denied access when trying to login to an FTP server or when trying to
65 change working directory to the one given in the URL.
66 .IP "CURLE_FTP_USER_PASSWORD_INCORRECT (10)"
67 This is never returned by current libcurl.
68 .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
69 After having sent the FTP password to the server, libcurl expects a proper
70 reply. This error code indicates that an unexpected code was returned.
71 .IP "CURLE_FTP_WEIRD_USER_REPLY (12)"
72 After having sent user name to the FTP server, libcurl expects a proper
73 reply. This error code indicates that an unexpected code was returned.
74 .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
75 libcurl failed to get a sensible result back from the server as a response to
76 either a PASV or a EPSV command. The server is flawed.
77 .IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
78 FTP servers return a 227-line as a response to a PASV command. If libcurl
79 fails to parse that line, this return code is passed back.
80 .IP "CURLE_FTP_CANT_GET_HOST (15)"
81 An internal failure to lookup the host used for the new connection.
82 .IP "CURLE_FTP_CANT_RECONNECT (16)"
83 A bad return code on either PASV or EPSV was sent by the FTP server,
84 preventing libcurl from being able to continue.
85 .IP "CURLE_FTP_COULDNT_SET_BINARY (17)"
86 Received an error when trying to set the transfer mode to binary.
87 .IP "CURLE_PARTIAL_FILE (18)"
88 A file transfer was shorter or larger than expected. This happens when the
89 server first reports an expected transfer size, and then delivers data that
90 doesn't match the previously given size.
91 .IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
92 This was either a weird reply to a 'RETR' command or a zero byte transfer
94 .IP "CURLE_FTP_WRITE_ERROR (20)"
95 After a completed file transfer, the FTP server did not respond a proper
96 \"transfer successful\" code.
97 .IP "CURLE_FTP_QUOTE_ERROR (21)"
98 When sending custom "QUOTE" commands to the remote server, one of the commands
99 returned an error code that was 400 or higher.
100 .IP "CURLE_HTTP_RETURNED_ERROR (22)"
101 This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
102 returns an error code that is >= 400.
103 .IP "CURLE_WRITE_ERROR (23)"
104 An error occurred when writing received data to a local file, or an error was
105 returned to libcurl from a write callback.
106 .IP "CURLE_MALFORMAT_USER (24)"
107 This is never returned by current libcurl.
108 .IP "CURLE_UPLOAD_FAILED (25)"
109 Failed starting the upload. For FTP, the server typcially denied the STOR
110 command. The error buffer usually contains the server's explanation to this.
111 (This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
112 .IP "CURLE_READ_ERROR (26)"
113 There was a problem reading a local file or an error returned by the read
115 .IP "CURLE_OUT_OF_MEMORY (27)"
116 Out of memory. A memory allocation request failed. This is serious badness and
117 things are severely screwed up if this ever occur.
118 .IP "CURLE_OPERATION_TIMEOUTED (28)"
119 Operation timeout. The specified time-out period was reached according to the
121 .IP "CURLE_FTP_COULDNT_SET_ASCII (29)"
122 libcurl failed to set ASCII transfer type (TYPE A).
123 .IP "CURLE_FTP_PORT_FAILED (30)"
124 The FTP PORT command returned error. This mostly happen when you haven't
125 specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
126 .IP "CURLE_FTP_COULDNT_USE_REST (31)"
127 The FTP REST command returned error. This should never happen if the server is
129 .IP "CURLE_FTP_COULDNT_GET_SIZE (32)"
130 The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is
131 an extension and not all servers support it. This is not a surprising error.
132 .IP "CURLE_HTTP_RANGE_ERROR (33)"
133 The HTTP server does not support or accept range requests.
134 .IP "CURLE_HTTP_POST_ERROR (34)"
135 This is an odd error that mainly occurs due to internal confusion.
136 .IP "CURLE_SSL_CONNECT_ERROR (35)"
137 A problem occurred somewhere in the SSL/TLS handshake. You really want the
138 error buffer and read the message there as it pinpoints the problem slightly
139 more. Could be certificates (file formats, paths, permissions), passwords, and
141 .IP "CURLE_FTP_BAD_DOWNLOAD_RESUME (36)"
142 Attempting FTP resume beyond file size.
143 .IP "CURLE_FILE_COULDNT_READ_FILE (37)"
144 A file given with FILE:// couldn't be opened. Most likely because the file
145 path doesn't identify an existing file. Did you check file permissions?
146 .IP "CURLE_LDAP_CANNOT_BIND (38)"
147 LDAP cannot bind. LDAP bind operation failed.
148 .IP "CURLE_LDAP_SEARCH_FAILED (39)"
150 .IP "CURLE_LIBRARY_NOT_FOUND (40)"
151 Library not found. The LDAP library was not found.
152 .IP "CURLE_FUNCTION_NOT_FOUND (41)"
153 Function not found. A required LDAP function was not found.
154 .IP "CURLE_ABORTED_BY_CALLBACK (42)"
155 Aborted by callback. A callback returned "abort" to libcurl.
156 .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
157 Internal error. A function was called with a bad parameter.
158 .IP "CURLE_BAD_CALLING_ORDER (44)"
159 This is never returned by current libcurl.
160 .IP "CURLE_HTTP_PORT_FAILED (45)"
161 Interface error. A specified outgoing interface could not be used. Set which
162 interface to use for outgoing connections' source IP address with
164 .IP "CURLE_BAD_PASSWORD_ENTERED (46)"
165 This is never returned by current libcurl.
166 .IP "CURLE_TOO_MANY_REDIRECTS (47)"
167 Too many redirects. When following redirects, libcurl hit the maximum amount.
168 Set your limit with CURLOPT_MAXREDIRS.
169 .IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
170 An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
171 the appropriate documentation.
172 .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
173 A telnet option string was Illegally formatted.
174 .IP "CURLE_OBSOLETE (50)"
175 This is not an error. This used to be another error code in an old libcurl
176 version and is currently unused.
177 .IP "CURLE_SSL_PEER_CERTIFICATE (51)"
178 The remote server's SSL certificate was deemed not OK.
179 .IP "CURLE_GOT_NOTHING (52)"
180 Nothing was returned from the server, and under the circumstances, getting
181 nothing is considered an error.
182 .IP "CURLE_SSL_ENGINE_NOTFOUND (53)"
183 The specified crypto engine wasn't found.
184 .IP "CURLE_SSL_ENGINE_SETFAILED (54)"
185 Failed setting the selected SSL crypto engine as default!
186 .IP "CURLE_SEND_ERROR (55)"
187 Failed sending network data.
188 .IP "CURLE_RECV_ERROR (56)"
189 Failure with receiving network data.
190 .IP "CURLE_SHARE_IN_USE (57)"
192 .IP "CURLE_SSL_CERTPROBLEM (58)"
193 problem with the local client certificate
194 .IP "CURLE_SSL_CIPHER (59)"
195 couldn't use specified cipher
196 .IP "CURLE_SSL_CACERT (60)"
197 peer certificate cannot be authenticated with known CA certificates
198 .IP "CURLE_BAD_CONTENT_ENCODING (61)"
199 Unrecognized transfer encoding
200 .IP "CURLE_LDAP_INVALID_URL (62)"
202 .IP "CURLE_FILESIZE_EXCEEDED (63)"
203 Maximum file size exceeded
204 .IP "CURLE_FTP_SSL_FAILED (64)"
205 Requested FTP SSL level failed
206 .IP "CURLE_SEND_FAIL_REWIND (65)"
207 When doing a send operation curl had to rewind the data to retransmit, but the
208 rewinding operation failed
209 .IP "CURLE_SSL_ENGINE_INITFAILED (66)"
210 Initiating the SSL Engine failed
211 .IP "CURLE_LOGIN_DENIED (67)"
212 The remote server denied curl to login (Added in 7.13.1)
213 .IP "CURLE_TFTP_NOTFOUND (68)"
214 File not found on TFTP server
215 .IP "CURLE_TFTP_PERM (69"
216 Permission problem on TFTP server
217 .IP "CURLE_TFTP_DISKFULL (70)"
218 Out of disk space on TFTP server
219 .IP "CURLE_TFTP_ILLEGAL (71)"
220 Illegal TFTP operation
221 .IP "CURLE_TFTP_UNKNOWNID (72)"
222 Unknown TFTP transfer ID
223 .IP "CURLE_TFTP_EXISTS (73)"
224 TFTP File already exists
225 .IP "CURLE_TFTP_NOSUCHUSER (74)"
227 .IP "CURLE_CONV_FAILED (75)"
228 Character conversion failed
229 .IP "CURLE_CONV_REQD (76)"
230 Caller must register conversion callbacks
231 .IP "CURLE_SSL_CACERT_BADFILE (77)"
232 Problem with reading the SSL CA cert (path? access rights?)
234 This is the generic return code used by functions in the libcurl multi
235 interface. Also consider \fIcurl_multi_strerror(3)\fP.
236 .IP "CURLM_CALL_MULTI_PERFORM (-1)"
237 This is not really an error. It means you should call
238 \fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
241 .IP "CURLM_BAD_HANDLE (1)"
242 The passed-in handle is not a valid CURLM handle.
243 .IP "CURLM_BAD_EASY_HANDLE (2)"
244 An easy handle was not good/valid. It could mean that it isn't an easy handle
245 at all, or possibly that the handle already is in used by this or another
247 .IP "CURLM_OUT_OF_MEMORY (3)"
249 .IP "CURLM_INTERNAL_ERROR (4)"
250 This can only be returned if libcurl bugs. Please report it to us!
251 .IP "CURLM_BAD_SOCKET (5)"
252 The passed-in socket is not a valid one that libcurl already knows about.
255 The "share" interface will return a CURLSHcode to indicate when an error has
256 occurred. Also consider \fIcurl_share_strerror(3)\fP.
258 All fine. Proceed as usual.
259 .IP "CURLSHE_BAD_OPTION (1)"
260 An invalid option was passed to the function.
261 .IP "CURLSHE_IN_USE (2)"
262 The share object is currently in use.
263 .IP "CURLSHE_INVALID (3)"
264 An invalid share object was passed to the function.