curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How to get more information about error code 7

From: Jason Proctor via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 19 Mar 2020 10:24:24 -0700

On Wed, Mar 18, 2020 at 11:29 PM Leo Song via curl-library
<curl-library_at_cool.haxx.se> 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
Received on 2020-03-19