cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl library's uninitialization is got hang

From: shine <shineinsky343_at_gmail.com>
Date: Thu, 28 Aug 2014 16:02:46 +0530

On 8/28/2014 2:26 PM, shine wrote:
> On 8/28/2014 12:40 PM, Daniel Stenberg wrote:
>> On Thu, 28 Aug 2014, shine wrote:
>>
>>> As per your suggestion i moved to curl 0.7.37.1 version
>>
>> I guess you mean 7.37.1.
>>
>>> 0000: CWD phase2
>>> 08_28_2014_07:00:07
>>> <= Recv header, 0000000033 bytes (0x00000021)
>>> 0000: 550 Failed to change directory.
>>> 08_28_2014_07:00:07
>>> => Send header, 0000000012 bytes (0x0000000c)
>>> 0000: MKD phase2
>>> 08_28_2014_07:00:08
>>> <= Recv header, 0000000040 bytes (0x00000028)
>>> 0000: 550 Create directory operation failed.
>>>
>>> Can you tell me what are the possible reason for this error.
>>
>> You clearly specified a directory that doesn't previously exist and
>> you've asked libcurl to create it then but as you can see the
>> creation of the directory fails as well.
>>
>> You're either using the wrong path or you have the wrong permissions
>> on the server. This is not a problem with libcurl.
>>
> Yes curl library is 7.37.1, and there is no problem which comes from
> curl library i own that.
> But on same path from fileZilla i am able to create and delete
> directory on FTP server.
> Also if it is of permission issue or something else then how can i
> resolve it?
Hello,

I have one more issue in which curl is able to create directory on FTP
server but file is not getting upload on server and curl is giving
timeout error(Timeout was reached : 28). Find below log:
So what is this issue can anyone tell me how to resolve it?

FTP URL for file uploading: (ip.txt file)
ftp_url =
ftp://<user_name>:<passwd>@<FTP_server_ip>/EIC_New_DT/Tester/phase2/3rdeye/ip.txt

Code:
do
{
     <other code>
     .
     .
     .
     curl_easy_reset(curl);

     curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
     curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
     /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

     /* example.com is redirected, so we tell libcurl to follow
redirection */
     //curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);

     //Gives progress report as well as whenever we got signal to stop
running transfer
     //Then we can use this call back to abort current running transfer
     curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, &progressReport);
     //To retrieve imp data of transfer
     //curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &progressData);
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);

     if (CURLE_OK != (res
          = curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L)))
       {
          iReturnVal = DS3_FAIL_FTPCONNECT;
          break;
       }
     if (CURLE_OK != (res
          = curl_easy_setopt(curl,CURLOPT_URL, ftp_url)))
       {
          iReturnVal = DS3_FAIL_FTPCONNECT;
          break;
       }
     curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
     curl_easy_setopt(curl, CURLOPT_READDATA, fp);
     curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)file_stat.st_size);

     // Connection establishment timeout
     curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 60);

     if (CURLE_OK != (res = curl_easy_perform(curl)))
     {
         printf("Err: %s : %d", curl_easy_strerror(res), res);
         iReturnVal = DS3_FAIL_FTPCONNECT;
         break;
     }
     .
     .
     .
     <other code>
}while(0);

Debug Prints:
08_28_2014_09:55:26
<= Recv header, 0000000023 bytes (0x00000017)
0000: 230 Login successful.
08_28_2014_09:55:26
=> Send header, 0000000005 bytes (0x00000005)
0000: PWD
08_28_2014_09:55:27
<= Recv header, 0000000009 bytes (0x00000009)
0000: 257 "/"
08_28_2014_09:55:27
=> Send header, 0000000007 bytes (0x00000007)
0000: CWD /
08_28_2014_09:55:27
<= Recv header, 0000000037 bytes (0x00000025)
0000: 250 Directory successfully changed.
08_28_2014_09:55:27
=> Send header, 0000000016 bytes (0x00000010)
0000: CWD EIC_New_DT
08_28_2014_09:55:28
<= Recv header, 0000000037 bytes (0x00000025)
0000: 250 Directory successfully changed.
08_28_2014_09:55:28
=> Send header, 0000000012 bytes (0x0000000c)
0000: CWD Tester
08_28_2014_09:55:29
<= Recv header, 0000000037 bytes (0x00000025)
0000: 250 Directory successfully changed.
08_28_2014_09:55:29
=> Send header, 0000000012 bytes (0x0000000c)
0000: CWD phase2
08_28_2014_09:55:30
<= Recv header, 0000000037 bytes (0x00000025)
0000: 250 Directory successfully changed.
08_28_2014_09:55:30
=> Send header, 0000000012 bytes (0x0000000c)
0000: CWD 3rdeye
08_28_2014_09:55:31
<= Recv header, 0000000037 bytes (0x00000025)
0000: 250 Directory successfully changed.
08_28_2014_09:55:31
=> Send header, 0000000006 bytes (0x00000006)
0000: EPSV
08_28_2014_09:55:31
<= Recv header, 0000000048 bytes (0x00000030)
0000: 229 Entering Extended Passive Mode (|||1029|).
08_28_2014_09:56:27
=> Send header, 0000000006 bytes (0x00000006)
0000: PASV
08_28_2014_09:56:28
<= Recv header, 0000000050 bytes (0x00000032)
0000: 227 Entering Passive Mode (220,225,147,217,4,6).

Regards,
Ravi Bhuva.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-28