cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1424 happy eyeballs problem with host unaccessible over ipv6

From: dominikh <dominikho_at_users.sf.net>
Date: Mon, 01 Dec 2014 20:38:28 +0000

I can reproduce this issue. Trying with the URL from the bug report:

    dominikh-pc 130? ~ $ curl -v https://sublime.wbond.net/channel.json
    * Hostname was NOT found in DNS cache
    * Trying 50.116.34.243...
    * Trying 2600:3c02:e000:42::1...
    * connect to 2600:3c02:e000:42::1 port 443 failed: Network is unreachable
    * Failed to connect to sublime.wbond.net port 443: Network is unreachable
    * Closing connection 0
    curl: (7) Failed to connect to sublime.wbond.net port 443: Network is unreachable

Works fine if passing -4

Using sprunge.us instead, where the server sometimes responds fast enough:

    dominikh-pc 7? ~ $ curl -sv sprunge.us > /dev/null
    * Rebuilt URL to: sprunge.us/
    * Hostname was NOT found in DNS cache
    * Trying 216.239.34.21...
    * Connected to sprunge.us (216.239.34.21) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.39.0
> Host: sprunge.us
> Accept: */*
>
    < HTTP/1.1 200 OK
    < Content-Type: text/html; charset=utf-8
    < Cache-Control: no-cache
    < Vary: Accept-Encoding
    < Date: Mon, 01 Dec 2014 20:34:06 GMT
    < Server: Google Frontend
    < Alternate-Protocol: 80:quic,p=0.02,80:quic,p=0.02
    < Transfer-Encoding: chunked
    <
    { [data not shown]
    * Connection #0 to host sprunge.us left intact
    
    dominikh-pc ~ $ curl -sv sprunge.us > /dev/null
    * Rebuilt URL to: sprunge.us/
    * Hostname was NOT found in DNS cache
    * Trying 216.239.36.21...
    * Trying 2001:4860:4802:32::15...
    * connect to 2001:4860:4802:32::15 port 80 failed: Network is unreachable
    * Trying 2001:4860:4802:34::15...
    * connect to 2001:4860:4802:34::15 port 80 failed: Network is unreachable
    * Trying 2001:4860:4802:36::15...
    * connect to 2001:4860:4802:36::15 port 80 failed: Network is unreachable
    * Trying 2001:4860:4802:38::15...
    * connect to 2001:4860:4802:38::15 port 80 failed: Network is unreachable
    * Failed to connect to sprunge.us port 80: Network is unreachable
    * Closing connection 0

Essentially, if curl manages to test and fail all v6 addresses before a v4 address succeeds, it gives up entirely, not waiting for v4 to finish.

    dominikh-pc ~ $ curl --version
    curl 7.39.0 (x86_64-unknown-linux-gnu) libcurl/7.39.0 LibreSSL/2.0.0 zlib/1.2.8 libidn/1.29
    Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
    Features: AsynchDNS IDN IPv6 Largefile NTLM NTLM_WB SSL libz

Curl was built with `--enable-threaded-resolver --enable-ipv6`.

---
** [bugs:#1424] happy eyeballs problem with host unaccessible over ipv6**
**Status:** pending
**Created:** Fri Sep 19, 2014 05:50 AM UTC by Michael Heuberger
**Last Updated:** Mon Nov 03, 2014 09:14 AM UTC
**Owner:** Daniel Stenberg
Running `curl https://sublime.wbond.net/channel.json` in the console tell me, its unreachable:
$ curl https://sublime.wbond.net/channel.json
curl: (7) Failed to connect to sublime.wbond.net port 443: Network is unreachable
But I can download that json from any browser instance.
Weird. How come?
Here more info. I am on Ubuntu 14.04:
$ curl -V
curl 7.37.1 (x86_64-pc-linux-gnu) libcurl/7.37.1 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-12-01

These mail archives are generated by hypermail.