Wordpress website not connecting to AWS Lightsail instance. ERR_CONNECTION_REFUSED

0

I have had this recurring issue with my Lightsail Instance where my wordpress website does not connect to the instance. I am getting this error message : Enter image description here

Here are the steps I took to troubleshoot this ongoing issue : 1- I rebooted my instance 2- I stopped and reopened my instance (effectively resetted it). 3- I checked the metrics and everything seems fine. My burst capacity is 100% and the website average usage is below 20%. 4- I checked all the other metrics (Status check failures, etc.) and nothing out of the ordinary. 5- I went in my SSH console, flushed the cache, and reset the machine from there. 6- The only way I can make the website work again is if I create a new instance with my saved snapshots. As this is time consuming and my website is down during this process, that option is not viable for me long term. 7- I have followed another post in re:post (rePost-User-5810350) that suggested to see if everything is working smoothly and here is the message I get :

curl www.cleansolnet.com curl: (7) Failed to connect to burhanidigital.com port 80: Connection refused

8- From there, I continued in the SSH console and inputted this : netstat -tulpn which gave me this : Enter image description here

Now I am stuck as my website still does not work.

How can I troubleshoot this issue of ERR_CONNECTION_REFUSED? It has been frustrating and I cannot figure out what the issue is. Also, is there any way for me to clone my website and send it to another webhost? AWS has been extremely frustrating as of late.

Thank you for your assistance.

asked 6 months ago446 views
2 Answers
0

netstat -tulpn shows that sshd is listening on port 22, which is why you're able to connect using SSH.

There doesn't appear to be a webserver running, which would be expected to be listening on port 80 and/or 443.

Could you try starting your webserver, you will know better than me what this is but could be something like httpd (Apache) or nginx.

profile picture
EXPERT
Steve_M
answered 6 months ago
  • Thanks for your quick reply Steve.

    How am I to proceed with starting my webserver? It is Apache that I am using.

    I have restarted the webserver (or I think I did):

    bitnami@ip-172-26-2-541:~$ sudo /opt/bitnami/ctlscript.sh restart apache Restarted apache

    If I am checking in the wrong place, could you provide me resources where I could go check how to troubleshoot the issue more in depth?

  • Yes that looks like the correct command https://docs.bitnami.com/aws/faq/administration/control-services/

    Now does netstat -tulpn show anything listening on 80 and 443 ? Similar to:

    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      -                   
    

    Apache log files are usually found in /var/log/httpd/, though you may have to become root in order to view them.

0

Thanks for your quick reply Steve.

How am I to proceed with starting my webserver? It is Apache that I am using.

I have restarted the webserver (or I think I did):

Enter image description here

If I am checking in the wrong place, could you provide me resources where I could go check how to troubleshoot the issue more in depth?

answered 6 months 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