curl / Mailing Lists / curl-users / 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: All curl requests gets the error "ssloc inet_ntop() failed"

From: Stefan Eissing via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 14 Feb 2024 09:06:13 +0100

In general, I'd say the curl build has enabled features that your operating system does not support. Did you build it yourself? If you can, we can inspect the configure output for what it detected.

> Am 14.02.2024 um 05:31 schrieb William Barto via curl-users <curl-users_at_lists.haxx.se>:
>
> Hello all,
>
> This is curl 8.6.0 just installed on HP-UX. *Every* connection attempt gets the same error:
>
> curl: (7) ssloc inet_ntop() failed with errno 225: Address family not supported by protocol family
>
> Note that every connection request ALSO reports an error trying to set TCP_NODELAY. The reference to "ssloc" seems to imply an interaction with openssl could be the culprit, but I don't know how to debug the internals of curl.
>
> Here's an example:
>
> # curl -v -o ms.html https://www.microsoft.com/
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host www.microsoft.com:443 was resolved.
> * IPv6: (none)
> * IPv4: 23.200.197.152
> * Trying 23.200.197.152:443...
> * Could not set TCP_NODELAY: Invalid argument
> * ssloc inet_ntop() failed with errno 225: Address family not supported by protocol family
> * ssloc inet_ntop() failed with errno 225: Address family not supported by protocol family
> * connect to 23.200.197.152 port 443 from port 0 failed: Invalid argument
> * Failed to connect to www.microsoft.com port 443 after 128 ms: Couldn't connect to server
> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
> * Closing connection
> curl: (7) ssloc inet_ntop() failed with errno 225: Address family not supported by protocol family
>
> ===============================================
>
> Output of curl --version
>
> curl 8.6.0 (ia64-hp-hpux11.31) libcurl/8.6.0 OpenSSL/3.0.12 zlib/1.3.1 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 OpenLDAP/2.6.6
> Release-Date: 2024-01-31
> Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
> Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets zstd
> ===============================================
>
> The inability to set TCP_NODELAY is one possible issue, since the most recent versions of curl enabled that as a default.
>
> I ran curl under the 'tusc' command to see if any system calls could help. Here's a subset of that output - Note the errno #22 EINVAL to the TCP_NODELAY option:
>
> gettimeofday(0x9fffffffffffe910, NULL) ............................................................................... = 0
> socket(AF_INET, SOCK_STREAM, 6) ...................................................................................... = 7
> write(2, "* ", 2) .................................................................................................. = 2
> write(2, " T r y i n g 1 5 9 . 2 5 3 ".., 30) ................................................................... = 30
> setsockopt(7, 0x6, TCP_NODELAY, 0x9fffffffffffe820, 8) ............................................................... ERR#22 EINVAL
> write(2, "* ", 2) .................................................................................................. = 2
> write(2, "C o u l d n o t s e t T C ".., 44) ................................................................... = 44
> setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, 0x9fffffffffffe910, 4) ....................................................... = 0
> setsockopt(7, 0x6, 0x3, 0x9fffffffffffe910, 4) ....................................................................... = 0
> setsockopt(7, 0x6, 0x4, 0x9fffffffffffe910, 4) ....................................................................... = 0
> fcntl(7, F_GETFL, 0) ................................................................................................. = 2
> fcntl(7, F_SETFL, 65538) ............................................................................................. = 0
> connect(7, 0x6000000000029738, 16) ................................................................................... ERR#245 EINPROGRESS
> getsockname(7, 0x9fffffffffffe720, 0x9fffffffffffe710) ............................................................... = 0
> write(2, "* ", 2) .................................................................................................. = 2
> write(2, "s s l o c i n e t _ n t o p ( ".., 89) ................................................................... = 89
> gettimeofday(0x9fffffffffffea40, NULL) ............................................................................... = 0
> sigaction(SIGPIPE, 0x9fffffffffffeab0, NULL) ......................................................................... = 0
> gettimeofday(0x9fffffffffffea10, NULL) ............................................................................... = 0
> poll(0x9fffffffffffeaa0, 2, 49) ...................................................................................... = 0
>
>
> 1. Is anyone else seeing this error in their environment?
>
> 2. Any ideas for me on how to debug or resolve the issue?
>
> __________________________
> William Barto
> CTO Data Transformation Corp.
> wbarto_at_dtcduat.com
>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without reading, printing, or saving.
> --
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
> Etiquette: https://curl.se/mail/etiquette.html

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-02-14