AWS EC2 error: site could not be reached - ec2.us-west-1.compute.amazonaws.com took too late to respond. Deploying NodeJS

I currently have an EC2 instance and it works with Amazon Linux and transferred my project (which contains both React / NodeJS / Express) to the EC2 instance via SFTP using FileZilla.

For EC2 security groups, I opened a port for 3000 (protocol: tcp, source: 0.0.0.0/0), which also defines my express.

So, I sneaked into the EC2 instance and ran the Express project, and saw that it was listening on port 3000 in the terminal. But as soon as I hit Public DNS with help ec2...us-west-1.compute.amazonaws.com:3000, it says that the site cannot be reached - ec2 ... us-west-1.compute.amazonaws.com is too late to respond.

What could be the problem and how can I go from here to connect to it?

Thank you in advance and reply / accept the answer.

+4
source share
3 answers

You may have encountered an outgoing traffic problem. You can be in the company network, physically connected or connected to the VPN network. In some cases, your VPN is not configured to handle separate traffic, so you must comply with the restrictions of the outgoing company.

In such a situation, you would like to use a proxy to access your site. when you block your security group, make sure you use the public proxy IP address (not for your company).

+1
source

Just check if your Node.js server is running on an EC2 instance.

:

  • , .
  • Node.js EC2.
    • sudo netstat -tulpn | grep :3000
  • - verbose i.e npm run server --verbose
    • .
  • . EC2.
  • ip: port i.e 35.2..: 3000

, . , - .

ec2:

sudo killall -9 node 
npm run server

IP (54.4.5. *: 3000) DNS (http://ec2...us-west-1.compute.amazonaws.com:3000).

, :)

+2

, , - . , , , . iptables -L -n. , , wirehark tcpdump, , 3000.

+1
source

Source: https://habr.com/ru/post/1665185/


All Articles