Thursday, January 20, 2011

No access to Debian Server on port 80 since unplanned restart

I have a VPS with Rapidswitch running on Debian. The server had been running fine, serving up sites through Apache2 until an engineer mistakenly cut through a power cable, taking the server offline.

Since they have resolved the power failure, I have been unable to access any of the sites on the server through my browser. I can ping the sites and ssh to the server. I have tried TELNETing port 80 on the server and get no response. I also found that MySQL had become corrupted after the unplanned shutdown and I have had to modify the my.cnf file to get it working again.

A ps aux shows that multiple instances of Apache are running on the machine. Rapidswitch are refusing support for the issue claiming that it is probably to do with firewall settings but I have not changed anything along these lines on the server.

Any ideas on a fix or further debugging would be greatly appreciated!

  • Take Rapidswitch's advice and check the iptables (or whatever firewall you use) configuration. It's easy to configure the running configuration without saving it as the startup configuration. Default configuration won't necessarily have port 80 open.

    iptables -vNL will show you what the current config is.

    If port 80 is being allowed (and on the correct IP address etc) then you have something to go back to Rapidswitch with.

    Matt : Thanks @dunxd, I tried running iptables -vNL and it did not show anything. I have also noticed that if I run top only apache, sshd, cron, mysqld, logger and init are running. This seems to be to few processes to me!
    Matt : It would seem that when Rapidswitch set the server up, they added an exception to iptables for port 80 but did not save the exception to the iptables configuration. I have added the exception again and saved it and all is now working. Thanks all for your thoughts.
    From dunxd
  • Where did you telnet from? If you did it from the server itself and it didn't work than I imagine Apache is not configured to listen on that port, or perhaps it isn't started /etc/init/httpd status or something similar. You can also run netstat -l to see what is listening.

    Run both of those commands with root privileges.

    When you say iptables does show anything, what does that mean exactly, can you post the output? That also has to be run as root.

  • Check the apache logs- is there anything in the error log showing any further light on the matter? Have you tried to telnet to port locally on the server itself? Also might be worth checking dmesg (/var/log/message) it might be that they use a SAN for your storage and its not been mounted correctly.

    From AliGibbs

0 comments:

Post a Comment