0

I just checked up on one of my servers to discover it stopped responding to any requests

around 2021-08-31 22:00:16.575 CEST giving:

Failed to connect to search.myapp.com port 443: Connection refused

Upon checking on my server it appears that the VM instance was restarted a day ago (docker show my main container up for only 24h).

This error screams firewall, so I double checked and I have both allow-http and allow-https firewall rules enabled for my instance.

EDIT: so I tried creating another new VM and just running a simple HTTP server, same error, connection refused on both :80 and :443.

What am I missing here ?

  • You have to start some service that listens on those ports. – Michael Hampton Sep 02 '21 at 13:13
  • 1
    Connection Refused typically means that you have reached the VM network stack but no process is listening on the port specified. For example, ports 80 and 443 would have Apache, Nginx, or similar configured to listen on those ports. Log in to the instance and future out what services are running and what ports are configured. Review the system logs (or serial port) and look for warnings or errors related to the services, out of disk space, etc. – John Hanley Sep 02 '21 at 21:55
  • Ensure that the affiliated firewalls are allowing traffic from 0.0.0.0/0 in TCP ports 80 and 443. If it’s there and you’re still facing problems, SSH to your VM, run 'netstat -a', share the result along with the details of the firewall rules attached with the VPC with which your VMs are attached. – Anant Swaraj Sep 03 '21 at 05:15

1 Answers1

0

Have you enabled port 443/80 on your server? Is the server listening on port 443/80? I am asking this because connection refused means the TCP connection on port 443 did not establish so you would need to run a netstat command on the server and doublecheck if the service is lintening on those port and the IPs. Please run the netstat and share your output so we wpuld be able to give a look on it.

Regards

Cristopher
  • 93
  • 4