https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?15582348732019-02-28T12:11:33ZRuby Issue Tracking SystemRuby trunk - Feature #15628: init_inetsock_internal should fallback to IPv4 if IPv6 is unreachablehttps://redmine.ruby-lang.org/issues/15628?journal_id=769062019-02-28T12:11:33Zsonalkr132 (Aditya Prakash)
<ul></ul><p>Related: <a href="https://github.com/rubygems/rubygems/pull/2662" class="external">rubygems/rubygems#2662</a></p>
Ruby trunk - Feature #15628: init_inetsock_internal should fallback to IPv4 if IPv6 is unreachablehttps://redmine.ruby-lang.org/issues/15628?journal_id=772452019-03-21T16:24:07Zsonalkr132 (Aditya Prakash)
<ul></ul><blockquote>
<p>Net:HTTP with timeout (Net::OpenTimeout) after after 60 seconds</p>
</blockquote>
<p>I meant &quot;Net:HTTP will timeout (Net::OpenTimeout) after 60 seconds&quot;.</p>
<p>Any suggestion on fixing this would very helpful <img src="https://gist.github.com/sonalkr132/debcab857485405e9a1117a62d5d1fd7/raw/caed6188620279f6a930a4058dba0def8153f5a9/download%2520(2).png" alt="" />. So far I have tried using <code>Socket.tcp(addr.ip_address, serv).close</code> to preemptively check if resolved addresses are reachable. It works but it is very inefficient.<br>
Besides the brute steps explained above, in the wild, this only affects host which have an IPv6 address but their IPv6 route to our CDN is broken. Personal home networks which generally have only IPv4 connectivity seamlessly use the IPv4 address to start the connection (without the need for a fallback).</p>