Google OAuth cannot be used: a funny bug caused by IPv6 not accessible

tl;dr;

server has IPv6 addr, but cannot ping ipv6.google.com

From Discourse log:

The authentication timed out, which is very wierd.

I decided to upgrade version, in case it is caused by the previous server migration. Then I got this error when

bundle install && pnpm i && bundle exec rake db:migrate  && bundle exec rake themes:update assets:precompile && pumactl restart
Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <Gem::Net::OpenTimeout: Failed to open TCP connection to rubygems.org:443 (execution expired) (https://rubygems.org/specs.4.8.gz)>

Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <Gem::Net::OpenTimeout: Failed to open TCP connection to rubygems.org:443 (execution expired) (https://rubygems.org/specs.4.8.gz)>
bundle install  42.42s user 0.98s system 23% cpu 3:03.49 total
root has logged off pts/3 from tmux(187561).       

then I ping rubygems.org, only to find the IPv6 addr not reachable.

:thinking: 一般我只见过 v4 不行,v6 行的。

1 Like