Connection refused in my server , sometime websites are working

connection refused happens on my server affect all my domain , sometime it is working, also some time when i save file it automatically unsaved

1 Reply

We have a few other posts that address this "connection refused" error, which I'll link below, but the fact that this is intermittent is a bit strange.

I would recommend using the port scanning tool nmap when you notice the issue occurring again. If needed, you can install it first with those instructions.

Run the scan on Linode's IP using the ports where your web server should be listening, likely 80 and/or 443.

This post discusses the results in more detail, but if the status is filtered, you can look into Troubleshooting Firewalls.

If the status is closed, then I recommend going through our guide to
Troubleshooting Web Servers, Databases, and Other Services and try starting and enabling the service.

Because the issue is intermittent, something might be shutting down your web server, so you can check your logs to try to find out what. Here are some commands to get you started.

Apache

grep ErrorLog -r /etc/apache2 
grep ErrorLog -r /etc/httpd

NGINX

grep error_log -r /etc/nginx

You can then try searching our Community Site or other forums for any specific errors your find.

Finally, here are some other posts about the "connection refused" error. Again, I don't know how much these will help because they weren't intermittent, but they could give you a sense of the types of things that can cause the error:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct