Re: How to get more information about error code 7
Leo Song via curl-library wrote: Thanks for the reply. I've already enabled CURLOPT_VERBOSE, and still getting Curl error 7. I've tried with CURLINFO_OS_ERRNO, and am getting errno 101, which maps to "Network is unreachable". Is there any other way to get more debugging info from openssl or socket calls? If there is a connection problem, this is really happening before TLS comes in to play. Might I suggest Wireshark or tcpdump to capture traffic and see what is going on at wire level. Rich --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
On Thu, Mar 19, 2020 at 05:33:52PM -0700, Leo Song via curl-library wrote: > Thanks for the reply. > I've already enabled CURLOPT_VERBOSE, and still getting Curl error 7. > > I've tried with CURLINFO_OS_ERRNO, and am getting errno 101, which maps to > "Network is unreachable". > Is there any other way to get more debugging info from openssl or socket > calls? I think you've reached the end of any help curl can give. The OS is reporting that it's unable to connect to the destination server. There are many possible reasons for that, none of which curl can be expected to know about. It might be a firewall in the way, the machine might have a bad network configuration, or the server may simply be down. I think you'll have to start using some elbow grease and track down which of those, or something else, it might be. --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
Thanks for the reply. I've already enabled CURLOPT_VERBOSE, and still getting Curl error 7. I've tried with CURLINFO_OS_ERRNO, and am getting errno 101, which maps to "Network is unreachable". Is there any other way to get more debugging info from openssl or socket calls? --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
On Thu, 19 Mar 2020, Ray Satiro via curl-library wrote: CURLOPT_ERRORBUFFER can sometimes be used to obtain a more detailed error string. [3] There's also CURLINFO_OS_ERRNO: https://curl.haxx.se/libcurl/c/CURLINFO_OS_ERRNO.html ... that can help explain why connect() failed. -- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
On 3/19/2020 4:30 PM, Leo Song via curl-library wrote: This Curl error 7 is happening intermittently, so yes I am able to connect to the server using the command line tool. Therefore, in case if this happens again in future, I want my application to display more error messages than just Curl error 7, which is why I am wondering if there is a way to add debugging log from openssl in libcurl. Please don't top-post it makes the conversation hard to follow. [1] CURLOPT_DEBUGFUNCTION does not work unless CURLOPT_VERBOSE is enabled. [2] CURLOPT_ERRORBUFFER can sometimes be used to obtain a more detailed error string. [3] [1]: https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post [2]: https://curl.haxx.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html [3]: https://curl.haxx.se/libcurl/c/CURLOPT_ERRORBUFFER.html --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
Hello Jason, Thanks for the reply. This Curl error 7 is happening intermittently, so yes I am able to connect to the server using the command line tool. Therefore, in case if this happens again in future, I want my application to display more error messages than just Curl error 7, which is why I am wondering if there is a way to add debugging log from openssl in libcurl. Best, On Thu, Mar 19, 2020 at 10:24 AM Jason Proctor wrote: > On Wed, Mar 18, 2020 at 11:29 PM Leo Song via curl-library > wrote: > > > > Hello, > > > > My application is trying to access to a host, and getting Curl error > code 7. > > Curl returned error code 7 - Couldn't connect to server > > > > I need to diagnose this a bit deeper and see what is happening. I've > already implemented a callback function with CURLOPT_DEBUGFUNCTION, and the > function displays messages related to "CURLINFO_TEXT", "CURLINFO_HEADER_IN" > or "CURLINFO_HEADER_OUT". > > > > However, all I see in our log file is the above message with error code > 7. It seems like I am not getting (and Curl is not logging) the error > message or code from openssl or socket calls (if ever exist). > > > > Is there a way to retrieve that? I would appreciate if someone can > pinpoint the code that does that. > > > > The version of libcurl is 7_66_0 > > Can you connect to your server using the Curl command line tool? That > would be a simple way of determining whether the client is doing > something wrong or the host is unavailable for some other reason. > > hth > J > --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
Re: How to get more information about error code 7
On Wed, Mar 18, 2020 at 11:29 PM Leo Song via curl-library wrote: > > Hello, > > My application is trying to access to a host, and getting Curl error code 7. > Curl returned error code 7 - Couldn't connect to server > > I need to diagnose this a bit deeper and see what is happening. I've already > implemented a callback function with CURLOPT_DEBUGFUNCTION, and the function > displays messages related to "CURLINFO_TEXT", "CURLINFO_HEADER_IN" or > "CURLINFO_HEADER_OUT". > > However, all I see in our log file is the above message with error code 7. It > seems like I am not getting (and Curl is not logging) the error message or > code from openssl or socket calls (if ever exist). > > Is there a way to retrieve that? I would appreciate if someone can pinpoint > the code that does that. > > The version of libcurl is 7_66_0 Can you connect to your server using the Curl command line tool? That would be a simple way of determining whether the client is doing something wrong or the host is unavailable for some other reason. hth J --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
How to get more information about error code 7
Hello, My application is trying to access to a host, and getting Curl error code 7. Curl returned error code 7 - Couldn't connect to server I need to diagnose this a bit deeper and see what is happening. I've already implemented a callback function with CURLOPT_DEBUGFUNCTION, and the function displays messages related to "CURLINFO_TEXT", "CURLINFO_HEADER_IN" or "CURLINFO_HEADER_OUT". However, all I see in our log file is the above message with error code 7. It seems like I am not getting (and Curl is not logging) the error message or code from openssl or socket calls (if ever exist). Is there a way to retrieve that? I would appreciate if someone can pinpoint the code that does that. The version of libcurl is 7_66_0 --- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html