The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache fails to restart

Discussion in 'EasyApache' started by schwim, Dec 30, 2008.

  1. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Hi there guys,

    One of my servers this morning was acting up. Sites with database backends were not working and cpanel/whm connections were attempting to download a file instead of serve a webpage.

    I went in and tried to restart apache. I managed to kill it, but it will not restart:

    Does this look like something that requires a restart? Is the inability to create files a cause or symptom?

    Suggestions on my next course of action are greatly appreciated.

    thanks,
    json
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider



    Check this line in the error you pasted.

    ==
    touch: cannot touch `/var/run/restartsrv_httpd.lock': Read-only file system
    touch: cannot touch `/var/run/restartsrv_httpd.lock': Read-only file system
    ==

    It appears your /var partition has gone read only, a reboot might fix it, but may require a manual FSCK.
     
  3. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Thanks very much for your help, Howard. After a restart, I can su, but "su -" freezes my shell connection, so I can no longer try to start or stop apache.

    Do I need to have them run FSCK on a reboot? From reading, it seems like nothing that can be done from a crippled su on shell.

    thanks,
    json
     
  4. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    Yes, usually reboot does fix the error, but in case it requires a manual FSCK, you can do it on a reboot. SSH won't be much helpful in this case if you are working remotely on this server. A person on site can run a manual FSCK which should fix it. Best of luck.
     
  5. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    You can force a fsck upon reboot by doing "touch /forcefsck" as root, or adding the -F switch to your shutdown command.
     
Loading...

Share This Page