- Newest
- Most votes
- Most comments
The error "connect() failed (111: Connection refused) while connecting to upstream" indicates that the application is not responding. The issue is associated with the application itself. It can be because it is using a different port or it can be because the application is not running at all.
To troubleshoot, I would check the file "web.stdout.log" in Bundle logs. Also, you can try to login inside the EC2 instance ( using SSH/SSM ..) and run:
curl http://localhost:<application_port_number>
For example:
curl http://127.0.0.1:8080
if no response received, this means that the application is not running on port 8080. Then, check if it is using a different port. To verify, try running the command: Note: For NodeJS applications, I would recommend checking port 3000 and port 5000.
netstat -ltpn
And, check which port has the nodejs process listening on. If no port found associated with nodejs, then the application is down. You need to examine "web.stdout.log" for application errors.
Relevant content
- asked 8 months ago
- asked 10 months ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago