Discussion:
Empty error message "Error setting curl:"
Brilliantov Kirill Vladimirovich
2013-02-08 10:30:31 UTC
Permalink
Hello!
I have to write files from ARM-based board on FTP, for this I think use
curlftpfs, I download and crosscompile curlftpfs-0.9.2, curl-7.29.0,
fuse-2.9.2 and it depends.

I can download file from board to server:
./curl -iT stream0_01.avi -u user:passwd ftp://192.168.255.1
% Total % Received % Xferd Average Speed Time Time Time
Current Dload Upload Total Spent
Left Speed 100 136k 0 0 100 136k 0 51290 0:00:02
0:00:02 --:--:-- 51354

Unfortunally when I try mount FTP I get only empy message about curl
setting:
curlftpfs 192.168.255.1 -dv -o user=user:passwd /mnt/ftp
Error setting curl:

With debug options I not get additional information:
curlftpfs -fv -o debug,ftpfs_debug=3,user=user:passwd 192.168.255.1 /mnt/ftp
Error setting curl:

Strace output:
............
mprotect(0x20000, 4096, PROT_READ) = 0
mprotect(0x2aace000, 4096, PROT_READ) = 0
epoll_wait(0x2aac9bc8, 0x7ed51e44, 0x7ed51e60, 0x2aaca020) = 1157
ipc_subcall(0x2aac9bd0, 0xc, 0x2aac9bec, 0xffffffec) = 0
futex(0x7ed51dcc, 0x189 /* FUTEX_??? */, 1) = -1 EAGAIN (Resource
temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x2ae492b0, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x2ae49150, [], SA_RESTART|SA_SIGINFO|0x4000000},
NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
gettimeofday({93, 996377}, NULL) = 0
brk(0) = 0x23000
brk(0x44000) = 0x44000
write(2, "Error setting curl: \n", 21Error setting curl:
) = 21
io_submit(0x1, 0x93370, 0x8 <unfinished ... exit status 1>
Process 1157 detached

Curl configuration parameters:
./configure --prefix=/usr --host=arm-fsl-linux-gnueabi --disable-http
--disable-file --disable-ldap --disable-ldaps --disable-rtsp
--disable-proxy --disable-dict --disable-telnet --disable-tftp
--disable-pop3 --disable-imap --disable-smtp --disable-gopher
--disable-manual --disable-libcurl-option --disable-ipv6
--disable-verbose --disable-sspi --disable-crypto-auth --disable-ntlm-wb
--disable-tls-srp --disable-cookies --disable-soname-bump
--with-zlib=/opt/IMX53/ltib/rpm/BUILD/zlib-1.2.3 --without-winssl
--without-darwinssl --without-ssl --without-gnutls --without-cyassl
--without-nss --without-axtls --without-ca-path --without-libmetalink
--without-libssh2 --without-librtmp --without-winidn --without-libidn
CC=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc

Yes, this is problem with curlftpfs, but may be you help me increase
curl output?

Thank you and excuse me for my bad english.
--
Best regards,
Brilliantov Kirill Vladimirovich
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2013-02-08 13:11:09 UTC
Permalink
Yes, this is problem with curlftpfs, but may be you help me increase curl
output?
CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get info out
from libcurl.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Brilliantov Kirill Vladimirovich
2013-02-08 13:56:34 UTC
Permalink
Post by Daniel Stenberg
CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get
info out from libcurl.
Hello, Daniel!
I found what CURLOPT_VERBOSE used in curlftpfs:
$ grep CURLOPT_VERBOSE -rnI -C1 .
./ftpfs.c-1544- if (ftpfs.verbose) {
./ftpfs.c:1545: curl_easy_setopt_or_die(easy, CURLOPT_VERBOSE, TRUE);
./ftpfs.c-1546- }

Why I not get verbose output if this options in use?
--
Best regards,
Brilliantov Kirill Vladimirovich

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Michael Wood
2013-02-08 14:31:42 UTC
Permalink
On 8 February 2013 15:56, Brilliantov Kirill Vladimirovich
Post by Brilliantov Kirill Vladimirovich
Post by Daniel Stenberg
CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get
info out from libcurl.
Hello, Daniel!
$ grep CURLOPT_VERBOSE -rnI -C1 .
./ftpfs.c-1544- if (ftpfs.verbose) {
./ftpfs.c:1545: curl_easy_setopt_or_die(easy, CURLOPT_VERBOSE, TRUE);
./ftpfs.c-1546- }
Why I not get verbose output if this options in use?
I think you'll have to ask the ftpfs developers that.
--
Michael Wood <***@gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Brilliantov Kirill Vladimirovich
2013-02-11 07:47:58 UTC
Permalink
Hello!
I think I found problem.
CurlFTPFS set CURLOPT_FTP_SSL option, but I buld curl without SSL support.
I not understand another - CurlFTPFS set CURLOPT_ERRORBUFFER to
error_buf (static char error_buf[CURL_ERROR_SIZE]) and use follow define
for set curl options:
#define curl_easy_setopt_or_die(handle, option, ...) \
do {\
CURLcode res = curl_easy_setopt(handle, option, __VA_ARGS__);\
if (res != CURLE_OK) {\
fprintf(stderr, "Error setting curl: %s (%d)\n", error_buf,
__LINE__);\
exit(1);\
}\
}while(0)
I add output line number for found error place.
Why I not get human readable error messages if CURLOPT_ERRORBUFFER point
to buffer for error message?
--
Best regards,
Brilliantov Kirill Vladimirovich

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg
2013-02-11 12:51:43 UTC
Permalink
Post by Brilliantov Kirill Vladimirovich
#define curl_easy_setopt_or_die(handle, option, ...) \
do {\
CURLcode res = curl_easy_setopt(handle, option, __VA_ARGS__);\
if (res != CURLE_OK) {\
fprintf(stderr, "Error setting curl: %s (%d)\n", error_buf, __LINE__);\
exit(1);\
}\
}while(0)
I add output line number for found error place.
Why I not get human readable error messages if CURLOPT_ERRORBUFFER point to
buffer for error message?
libcurl *may* store error message there - which is explained by the man page.

A slightly better approach for that macro would be to check for a zero-length
string there and if so, use curl_easy_strerror() to get a decent message to
show. Or just show the error code.
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Continue reading on narkive:
Loading...