Cannot connect to registry.npmjs.org from EC2/us-west-2

0

It started when I couldn't install npm packages on one of my VMs and eventually I tracked it down to TCP connections to registry.npmjs.org hanging indefinitely on any VM in us-west-2 for my account. When I create an identical VM in us-east-1, npm works fine and I can connect to registry.npmjs.org with curl as well. This appears to be a routing problem with VMs in us-west-2.

This is one of npm's registry IP addresses. There's a few more, different only in the 3rd quad.

registry.npmjs.org.     205     IN      A       104.16.27.35  

This command hangs indefinitely and so does any npm command:

curl https://registry.npmjs.org/  

Wireshark just shows that no packets are ever received. What's weird is that when I run traceroute from us-east-1, there's only a dozen of hops to registry.npmjs.org and everything works fine, but traceroute from us-west-2 goes through as many as 27 hops before it times out. Here's last few hops, skipping timed out ones:

20  100.92.128.96 (100.92.128.96)  18.412 ms  
21  100.92.128.61 (100.92.128.61)  7.759 ms  
22  100.92.125.38 (100.92.125.38)  9.742 ms  
25  100.92.133.49 (100.92.133.49)  7.865 ms  
26  150.222.214.102 (150.222.214.102)  10.175 ms  
27  99.83.70.195 (99.83.70.195)  9.859 ms  

The last couple of addresses belong to AWS, which seems to hint that it's an AWS problem, but it's just a guess.

This has been going on for over a week and there are no active AWS issues reported in my console. If anybody has a working npm in us-west-2, can you share any insights how you got it working?

This is the traceroute command I ran. Wonder if it goes through as many hops in a working environment.

traceroute -q 1 -F registry.npmjs.org  

Thanks!

質問済み 2年前460ビュー
2回答
0

I tried creating a VM in us-west-1 today and it also works and pulls npm packages from the registry and traceroute only takes 14 hops to reach registry.npmjs.org. There's something not quite right with routing in us-west-2.

回答済み 2年前
0
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ