The DNS of the server #3 is offline, appear this msg in the server status:
the problem is serious?
Thanks
| Quote: |
| Down - 111 - Connection refused |
the problem is serious?
Thanks
| Quote: |
| Down - 111 - Connection refused |
| Bondings wrote: |
| By the way, how did you post this? |
| Bondings wrote: |
| By the way, how did you post this? |
| mOrpheuS wrote: | ||
Local/intermediate DNS caching probably ? |
| cr3ativ3 wrote: |
| A suggestion I would like to add, Create a script configured as a cron job, and have it check the status of services... and if a service is down then have it automatically attempt to restart it.
Just incase the problem occurs in the future. |
| jmlworld wrote: | ||
Yeah, I agree. There's a script over http://frihost-server-status.us.to which checks if the server is up or not. So implementing another script which restarts the server once its down would be easier as I guess. However, I think such script is not reliable and/or my need more testing before implementing it. |
| Bondings wrote: |
| Indeed. It simply needed to be restarted.
By the way, how did you post this? |
| alvarorojas4 wrote: | ||
I don't know... i can enter here... but not my site Now is fixed. Thanks! |
| Bondings wrote: |
| Anyway, to the others, monitoring is indeed a good idea. For the server stability I was planning to restart the services anyway every few hours (temporary fix). |
| cr3ativ3 wrote: |
| i am positive I could make up a script in like 5 or 10 mins, that would be able to do such a thing. If you would like me to I may post a script in a little while to do just that. |
| Bondings wrote: |
| However for some reason sometimes there is huge memory (swap) usage causing very slow loading time. And restarting Apache solves it. |
| jmlworld wrote: |
| cr3ativ3, you are very familiar with BASH. Can you please post a code here, so I can see how you did it? |
| Bondings wrote: |
| Anyway, to the others, monitoring is indeed a good idea. For the server stability I was planning to restart the services anyway every few hours (temporary fix). |
| Bondings wrote: |
| Any help is of course appreciated.
@cr3ativ3, yes that was indeed a real pain, although only every 3 hours (the others were caused by other things I guess). However for some reason sometimes there is huge memory (swap) usage causing very slow loading time. And restarting Apache solves it. |
| Code: |
|
host=frih.org if netcat -z $host 80 then echo "Apache is UP" # HTTP is up else echo "Apache is DOWN, restarting... `date`" >> ./log # HTTP is down, restart service fi if netcat -z $host 443 then echo "Apache SSL is UP." # HTTPS is up else echo "Apache SSL is DOWN, restarting... `date`" >> ./log # HTTPS is down, restart service fi if netcat -z $host 21 then echo "FTP is UP." # FTP is up else echo "FTP is DOWN, restarting... `date`" >> ./log # FTP is down, restart service fi if netcat -z $host 53 then echo "DNS is UP." # DNS is up else echo "DNS is DOWN, restarting... `date`" >> ./log # DNS is down, restart service fi if netcat -z $host 110 then echo "POP3 is UP." # POP3 is up else echo "POP3 is DOWN, restarting... `date`" >> ./log # POP3 is down, restart service fi |
| Quote: |
| echo "POP3 is DOWN, restarting... `date`" >> ./log |
| Aredon wrote: |
| Ahh so that explains the random 404 hiccups then. Is there any way we could get some sort of error page up to warn users that the server is restarting? Rather than getting a "does not exist"? Just a suggestion, don't know if it's possible. |
| Bondings wrote: |
| Thanks for the script! This seems like a better way to check the services than most other restart scripts. Most of them (including DA I think) check if the process is still running (which was the case for named/bind), however not if it responds to connections. So if a service is still running, but not responding to connections, this script will restart it. I've changed the host to the ip address, considering this way it works even if named is down. And I have added the restart commands. I put it as a cron job every minute, I don't see the point in putting it less often considering it isn't a heavy script. |