libcurl errors libcurl-errors(3)
NAME
libcurl-errors - error codes in libcurl
DESCRIPTION
This man page includes most, if not all, available error
codes in libcurl. Why they occur and possibly what you can
do to fix the problem are also included.
CURLcode
Almost all "easy" interface functions return a CURLcode
error code. No matter what, using the curleasysetopt(3)
option CURLOPTERORBUFER is a good idea as it will give
you a human readable error string that may offer more
details about the cause of the error than just the error
code. curleasystrerror(3) can be called to get an error
string from a given CURLcode number.
CURLcode is one of the following:
CURLEOK (0)
All fine. Proceed as usual.
CURLEUNSUPORTEDPROTOCOL (1)
The URL you passed to libcurl used a protocol that this
libcurl does not support. The support might be a
compile-time option that you didn't use, it can be a
misspelled protocol string or just a protocol libcurl
has no code for.
CURLEFAILEDINIT (2)
Very early initialization code failed. This is likely
to be an internal error or problem.
CURLEURLMALFORMAT (3)
The URL was not properly formatted.
CURLECOULDNTRESOLVEPROXY (5)
Couldn't resolve proxy. The given proxy host could not
be resolved.
CURLECOULDNTRESOLVEHOST (6)
Couldn't resolve host. The given remote host was not
resolved.
CURLECOULDNTCONECT (7)
Failed to connect() to host or proxy.
CURLEFTPWEIRDSERVEREPLY (8)
After connecting to a FTP server, libcurl expects to
get a certain reply back. This error code implies that
it got a strange or bad reply. The given remote server
is probably not an OK FTP server.
libcurl 7.19.0 Last change: 8 Jun 2008 1
libcurl errors libcurl-errors(3)
CURLEREMOTEACESDENIED (9)
We were denied access to the resource given in the URL.
For FTP, this occurs while trying to change to the
remote directory.
CURLEFTPWEIRDPASREPLY (11)
After having sent the FTP password to the server, lib-
curl expects a proper reply. This error code indicates
that an unexpected code was returned.
CURLEFTPWEIRDPASVREPLY (13)
libcurl failed to get a sensible result back from the
server as a response to either a PASV or a EPSV com-
mand. The server is flawed.
CURLEFTPWEIRD227FORMAT (14)
FTP servers return a 227-line as a response to a PASV
command. If libcurl fails to parse that line, this
return code is passed back.
CURLEFTPCANTGETHOST (15)
An internal failure to lookup the host used for the new
connection.
CURLEFTPCOULDNTSETYPE (17)
Received an error when trying to set the transfer mode
to binary or ASCI.
CURLEPARTIALFILE (18)
A file transfer was shorter or larger than expected.
This happens when the server first reports an expected
transfer size, and then delivers data that doesn't
match the previously given size.
CURLEFTPCOULDNTRETRFILE (19)
This was either a weird reply to a 'RETR' command or a
zero byte transfer complete.
CURLEQUOTEROR (21)
When sending custom "QUOTE" commands to the remote
server, one of the commands returned an error code that
was 400 or higher (for FTP) or otherwise indicated
unsuccessful completion of the command.
CURLEHTPRETURNEDEROR (22)
This is returned if CURLOPTFAILONEROR is set TRUE and
the HTP server returns an error code that is >= 400.
(This error code was formerly known as
CURLEHTPNOTFOUND.)
CURLEWRITEROR (23)
An error occurred when writing received data to a local
libcurl 7.19.0 Last change: 8 Jun 2008 2
libcurl errors libcurl-errors(3)
file, or an error was returned to libcurl from a write
callback.
CURLEUPLOADFAILED (25)
Failed starting the upload. For FTP, the server typi-
cally denied the STOR command. The error buffer usually
contains the server's explanation for this. (This
error code was formerly known as
CURLEFTPCOULDNTSTORFILE.)
CURLEREADEROR (26)
There was a problem reading a local file or an error
returned by the read callback.
CURLEOUTOFMEMORY (27)
A memory allocation request failed. This is serious
badness and things are severely screwed up if this ever
occurs.
CURLEOPERATIONTIMEDOUT (28)
Operation timeout. The specified time-out period was
reached according to the conditions.
CURLEFTPORTFAILED (30)
The FTP PORT command returned error. This mostly hap-
pens when you haven't specified a good enough address
for libcurl to use. See CURLOPTFTPORT.
CURLEFTPCOULDNTUSEREST (31)
The FTP REST command returned error. This should never
happen if the server is sane.
CURLERANGEROR (33)
The server does not support or accept range requests.
CURLEHTPOSTEROR (34)
This is an odd error that mainly occurs due to internal
confusion.
CURLESLCONECTEROR (35)
A problem occurred somewhere in the SL/TLS handshake.
You really want the error buffer and read the message
there as it pinpoints the problem slightly more. Could
be certificates (file formats, paths, permissions),
passwords, and others.
CURLEFTPBADOWNLOADRESUME (36)
Attempting FTP resume beyond file size.
CURLEFILECOULDNTREADFILE (37)
A file given with FILE:/ couldn't be opened. Most
likely because the file path doesn't identify an
libcurl 7.19.0 Last change: 8 Jun 2008 3
libcurl errors libcurl-errors(3)
existing file. Did you check file permissions?
CURLELDAPCANOTBIND (38)
LDAP cannot bind. LDAP bind operation failed.
CURLELDAPSEARCHFAILED (39)
LDAP search failed.
CURLEFUNCTIONOTFOUND (41)
Function not found. A required zlib function was not
found.
CURLEABORTEDBYCALBACK (42)
Aborted by callback. A callback returned "abort" to
libcurl.
CURLEBADFUNCTIONARGUMENT (43)
Internal error. A function was called with a bad param-
eter.
CURLEINTERFACEFAILED (45)
Interface error. A specified outgoing interface could
not be used. Set which interface to use for outgoing
connections' source IP address with CURLOPTINTERFACE.
(This error code was formerly known as
CURLEHTPORTFAILED.)
CURLETOMANYREDIRECTS (47)
Too many redirects. When following redirects, libcurl
hit the maximum amount. Set your limit with
CURLOPTMAXREDIRS.
CURLEUNKNOWNTELNETOPTION (48)
An option set with CURLOPTELNETOPTIONS was not
recognized/known. Refer to the appropriate documenta-
tion.
CURLETELNETOPTIONSYNTAX (49)
A telnet option string was Illegally formatted.
CURLEPERFAILEDVERIFICATION (51)
The remote server's SL certificate or SH md5 finger-
print was deemed not OK.
CURLEGOTNOTHING (52)
Nothing was returned from the server, and under the
circumstances, getting nothing is considered an error.
CURLESLENGINENOTFOUND (53)
The specified crypto engine wasn't found.
CURLESLENGINESETFAILED (54)
libcurl 7.19.0 Last change: 8 Jun 2008 4
libcurl errors libcurl-errors(3)
Failed setting the selected SL crypto engine as
default!
CURLESENDEROR (55)
Failed sending network data.
CURLERECVEROR (56)
Failure with receiving network data.
CURLESLCERTPROBLEM (58)
problem with the local client certificate.
CURLESLCIPHER (59)
Couldn't use specified cipher.
CURLESLCACERT (60)
Peer certificate cannot be authenticated with known CA
certificates.
CURLEBADCONTENTENCODING (61)
Unrecognized transfer encoding.
CURLELDAPINVALIDURL (62)
Invalid LDAP URL.
CURLEFILESIZEXCEDED (63)
Maximum file size exceeded.
CURLEUSESLFAILED (64)
Requested FTP SL level failed.
CURLESENDFAILREWIND (65)
When doing a send operation curl had to rewind the data
to retransmit, but the rewinding operation failed.
CURLESLENGINEINITFAILED (66)
Initiating the SL Engine failed.
CURLELOGINDENIED (67)
The remote server denied curl to login (Added in
7.13.1)
CURLETFTPNOTFOUND (68)
File not found on TFTP server.
CURLETFTPERM (69)
Permission problem on TFTP server.
CURLEREMOTEDISKFUL (70)
Out of disk space on the server.
CURLETFTPILEGAL (71)
libcurl 7.19.0 Last change: 8 Jun 2008 5
libcurl errors libcurl-errors(3)
Illegal TFTP operation.
CURLETFTPUNKNOWNID (72)
Unknown TFTP transfer ID.
CURLEREMOTEFILEXISTS (73)
File already exists and will not be overwritten.
CURLETFTPNOSUCHUSER (74)
This error should never be returned by a properly func-
tioning TFTP server.
CURLECONVFAILED (75)
Character conversion failed.
CURLECONVREQD (76)
Caller must register conversion callbacks.
CURLESLCACERTBADFILE (77)
Problem with reading the SL CA cert (path? access
rights?)
CURLEREMOTEFILENOTFOUND (78)
The resource referenced in the URL does not exist.
CURLESH (79)
An unspecified error occurred during the SH session.
CURLESLSHUTDOWNFAILED (80)
Failed to shut down the SL connection.
CURLEAGAIN (81)
Socket is not ready for send/recv wait till it's ready
and try again. This return code is only returned from
curleasyrecv(3) and curleasysend(3) (Added in
7.18.2)
CURLESLCRLBADFILE (82)
Failed to load CRL file (Added in 7.19.0)
CURLESLISUEREROR (83)
Issuer check failed (Added in 7.19.0)
CURLEOBSOLETE*
These error codes will never be returned. They were
used in an old libcurl version and are currently
unused.
CURLMcode
This is the generic return code used by functions in the
libcurl multi interface. Also consider
curlmultistrerror(3).
libcurl 7.19.0 Last change: 8 Jun 2008 6
libcurl errors libcurl-errors(3)
CURLMCALMULTIPERFORM (-1)
This is not really an error. It means you should call
curlmultiperform(3) again without doing select() or
similar in between.
CURLMOK (0)
Things are fine.
CURLMBADHANDLE (1)
The passed-in handle is not a valid CURLM handle.
CURLMBADEASYHANDLE (2)
An easy handle was not good/valid. It could mean that
it isn't an easy handle at all, or possibly that the
handle already is in used by this or another multi han-
dle.
CURLMOUTOFMEMORY (3)
You are doomed.
CURLMINTERNALEROR (4)
This can only be returned if libcurl bugs. Please
report it to us!
CURLMBADSOCKET (5)
The passed-in socket is not a valid one that libcurl
already knows about. (Added in 7.15.4)
CURLMUNKNOWNOPTION (6)
curlmultisetopt() with unsupported option (Added in
7.15.4)
CURLSHcode
The "share" interface will return a CURLSHcode to indicate
when an error has occurred. Also consider
curlsharestrerror(3).
CURLSHEOK (0)
All fine. Proceed as usual.
CURLSHEBADOPTION (1)
An invalid option was passed to the function.
CURLSHEINUSE (2)
The share object is currently in use.
CURLSHEINVALID (3)
An invalid share object was passed to the function.
CURLSHENOMEM (4)
Not enough memory was available. (Added in 7.12.0)
libcurl 7.19.0 Last change: 8 Jun 2008 7
libcurl errors libcurl-errors(3)
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcurl
Interface Stability Uncommitted
NOTES
Source for C-URL is available on http:/opensolaris.org.
libcurl 7.19.0 Last change: 8 Jun 2008 8
|