on 24 Apr, 2018 02:40 PM
*This is on a fully updated Debian 8 server. I have other servers with the same OS at the same host without this issue. I used ruby-build to install ruby 2.3.7 and ruby 2.4.4, and I can't find a single error in any system log (including the firewall). I'd be ecstatic if anyone has any idea of where to look or what to check. All rubies on this server suddenly started having the same issue as OP a couple weeks ago.
I'm experiencing the same problem, running NixOS and I've tried ruby 2.4.1 and 2.5.0. It seems to affect every gem I've tried so far (ffi, coderay, rouge, spoon). I've tried https and http. I'm able to curl a specific gem (e.g. `curl http://rubygems.org/gems/ffi-1.9.23.gem -o outfile`) successfully.
I just tried the same nmap commands and IPv6 looks fine now as well. I'm also now able to fetch dependencies successfully. It's not quite definitive evidence, but does lend support to the theory that IPv6 was the issue. Thanks for pointing that out, Alexei!
on 10 May, 2018 08:16 PM
The same problem is currently being experienced by me.
Rubygems is unable to download from https://api.rubygems.org/specs.4.8.gz, yet that address is reachable by me (via ping) and I can download the file using my browser without problem.
I only just now updated to the latest rubygems (2.7.6, using Ruby 2.4.4p296) (had issues before and after update).
sonalkr132 on 19 May, 2018 09:28 PM
Thanks for pointing out that our ipv6 isn't work. We will try to fix it as soon as possible. It shouldn't cause your gem install to fail or timeout tho. rubygems client uses ipv4 addresses. Can you please verify you see ipv6 requests are being made when you run gem install ?
on 22 May, 2018 12:44 PM
Here is gem's debug output, if it will be helpful:
$ time gem search --remote --verbose --debug rails
NOTE: Debugging mode prints all exceptions even when rescued
Exception `LoadError' at /usr/lib/ruby/2.5.0/resolv.rb:170 - LoadError
*** REMOTE GEMS ***
Exception `Errno::EEXIST' at /usr/lib/ruby/2.5.0/fileutils.rb:232 - File exists @ dir_s_mkdir - /home/alexei/.gem/specs/api.rubygems.org%443
Exception `Errno::ENOENT' at /usr/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:325 - No such file or directory @ rb_file_s_stat - /home/alexei/.gem/specs/api.rubygems.org%443/latest_specs.4.8
Exception `Net::OpenTimeout' at /usr/lib/ruby/2.5.0/net/http.rb:937 - execution expired
Exception `Net::OpenTimeout' at /usr/lib/ruby/2.5.0/net/http.rb:939 - execution expired
Exception `Net::OpenTimeout' at /usr/lib/ruby/2.5.0/timeout.rb:114 - execution expired
Exception `Net::OpenTimeout' at /usr/lib/ruby/2.5.0/net/http.rb:997 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at /usr/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:306 - timed out (https://api.rubygems.org/latest_specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at /usr/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:269 - timed out (https://api.rubygems.org/latest_specs.4.8.gz)
kerrizor closed this discussion
on 22 Jul, 2018 05:11 PM.
sonalkr132 re-opened this discussion
on 25 Aug, 2020 06:13 AM
sonalkr132 on 25 Aug, 2020 06:15 AM
Sorry about the delay in getting this resolved. I have filed a support ticket on Fastly and hopefully, we will get this resolved soon.
It would be very helpful if any of you can take some to run some commands for debugging info. Specifically, what is the output of the following commands when running from the host which has IPv6 connection issue to rubygems.org:
If you are feeling particularly generous, please add send pcap file for requests to rubygems.org over IPv6 as well. You can use tshark -i any -f "host rubygems.org" -w rubygems.pcap or sudo tcpdump -i any host rubygems.org -w rubygems.pcap
$ traceroute6 2a04:4e42::70
traceroute6 to 2a04:4e42::70 (2a04:4e42::70) from 2600:6c44:97f:fa4a:6010:8efa:2829:ed0f, 64 hops max, 12 byte packets
1 2600:6c44:97f:fa4a:6238:e0ff:fe73:2187 2.125 ms 2.838 ms 2.362 ms
2 * * *
3 2001-0506-0100-2216-0000-0000-0000-0005.inf6.spectrum.com 18.902 ms 13.942 ms 12.446 ms
4 2001-0506-0100-80ba-0000-0000-0000-0001.inf6.spectrum.com 14.032 ms 15.166 ms *
5 2001-0506-0100-206c-0000-0000-0000-0001.inf6.spectrum.com 20.474 ms 17.439 ms *
6 2001-0506-0100-2076-0000-0000-0000-0005.inf6.spectrum.com 22.806 ms 19.869 ms *
7 2001-0506-0100-0202-0000-0000-0000-0009.inf6.spectrum.com 33.397 ms * 26.311 ms
8 2001-0506-0100-0013-0000-0000-0000-0005.inf6.spectrum.com 24.628 ms * 30.159 ms
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
... meanwhile ...
$ sudo tcpdump -i any host rubygems.org -w rubygems.pcap
tcpdump: data link type PKTAP
tcpdump: listening on any, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes
^C72 packets captured
16797 packets received by filter
0 packets dropped by kernel
$ ls -l rubygems.pcap
-rw-r--r-- 1 root admin 10988 Aug 26 22:33 rubygems.pcap
users who have the issue with accessing rubygems.org specifically are able to access other sites on IPv6. Even wget -6 google.com will timeout for you. Perhaps you can run some tests on your network about why you are not able to connect to IPv6 sites when you have an IPv6 address on your host https://test-ipv6.com/.
Please feel free to let us know if you are abl to access sites beside rubygems.org on IPv6 but not rubygems.org.
At this time I am intrested debug output from user who can't access rubygems.org specifically.
If you are interested in knowing why gem install is timing out even tho you have IPv4 connectivity, please check this.
on 27 Aug, 2020 02:35 PM
Thanks sonalkr132 for the quick reply, and sorry that I can't provide the data you need.
I look forward to your PR being finalized and merged, so that people with broken IPv6 support (I'm guessing there are many besides only me) can still have working gem commands out of the box. I greatly appreciate your efforts in driving this forward!