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

0

npm hangs for minutes and then time outs when running in us-west-2. Happens on Windows or Linux VMs. npm on same VM images in us-west-1 and us-east-1 works just fine.

Running any of these times out:

curl --connect-timeout 15 https://registry.npmjs.org/
curl --connect-timeout 15 http://registry.npmjs.org/

Wireshark just shows that no packets are ever received. What's weird is that when I run traceroute from us-west-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:

traceroute -q 1 -F registry.npmjs.org

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.

This has been going for a while now and seems like a routing issue in AWS. Is there anybody being able to run npm in us-west-2?

  • Can you please open a support case for this as well ? You are right - it does seems peculiar.

  • Thanks for responding.

    My account cannot open technical support cases and I'm reluctant to upgrade just to get AWS to look into their routing issue.

  • Does it happen for npmjs only or any external host?

  • Depends on which destination network I'm trying to connect to. For example, I get HTTP responses from www.cnn.com, but not nodejs.org.

  • Launched a test Ubuntu instance in default VPC and default subnet in usw2-az2 and it works just fine. So probably this is smth in your network configuration... Are you trying to launch in default VPC/subnet?

asked 2 years ago769 views
1 Answer
0
Accepted Answer

This question has been answered. In short, the VPC ACL had an entry blocking registry.npmjs.org.

The new forum doesn't allow link to comments and collapses them by default, which makes it impossible for people to see the prior discussion. If you expand comments and click this link, it will jump to the comment with details.

https://repost.aws/questions/QUlO_9mGjYQbieMm-HhMaIpA/cannot-connect-to-registry-npmjs-org-from-ec-2-us-west-2#COHYs5FGSBQAGRqZDgRFM11g

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions