Apache will not start up correctly

Discussion in 'Apache' started by thechickk, May 17, 2007.

  1. #1
    I'm running IHS/Apache on Red Hat. My webserver has started and worked before and has served up a WAS app I have running. It seems randomly, it will not start up correctly, but there are no errors in the logs. What happens is,

    I'll start the server using
    ./apachect1 -k start
    The only process that starts now is:
    nobody 7684 1 0 09:47 ? 00:00:00 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
    No child processes are spawned, and I can't access the defualt IHS server homepage, which I typically always can access.

    When I try to stop the server, it says:
    httpd (no pid file) not running
    but when I try to start the server again, it says:
    (98)Address already in use: make_sock: could not bind to address [::]:80
    no listening sockets available, shutting down
    Unable to open logs

    this is because if I do ps -ef | grep httpd, there is that httpd process above running, and I have to kill it manually.

    The error_log doesn't contain any errors, it just says:
    [Thu May 17 09:47:09 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/IBMIHS/bin/suexec)
    [Thu May 17 09:47:09 2007] [info] mod_unique_id: using ip addr 192.168.10.108
    [Thu May 17 09:47:10 2007] [info] mod_unique_id: using ip addr 192.168.10.108

    and the access_log doesn't have anything in it.

    Any suggestions as to why my web server is not starting correctly? Or how else I can trouble shoot this?

    Thanks!
     
    thechickk, May 17, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    clearly says that "(98)Address already in use: make_sock: could not bind to address [::]:80" . Your default port (80) is not free, check with netstat command to see what service is on that port
     
    gibex, May 20, 2007 IP
  3. nukepuppy

    nukepuppy Peon

    Messages:
    93
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hoping you have shell access..
    ps aux | grep httpd

    if any just pkill -9 httpd

    then restart... otherwise

    lsof -i :80

    this will show you what application *IS* running on port 80


    you should be able to restart..

    its easy to get rid of your pid file.. its just a small reference for a startup script to know what pid number to send signals to

    to recreate your error.. when you get everything running again.. delete the pid file.. you will have the same problem again.. killing the httpds manually will be your solution


    you might wanna check where your httpd.conf is storing the pid file.. it could be that it cannot write to it as the user who runs as you
     
    nukepuppy, May 20, 2007 IP
  4. thechickk

    thechickk Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for the replies. I am running as root and all files under IBMIHS are owned by root and have 777 permissions. The only process running on port 80 is apache. The problem seems to be that the service doesn't start up completely. When I do the ./apachect1 stop it says the process is not running, but when I do a ps, it is running. However, the pid file which is supposed to be in <IHS HOME>/logs is not there. Any reason why this would not get created? Ther e is nothing in the error logs.
     
    thechickk, May 29, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Can you see in error_log?
     
    inworx, May 30, 2007 IP
  6. thechickk

    thechickk Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nothing in the error_log except:
    [Tue May 29 21:46:05 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/IBMIHS/bin/suexec)
    [Tue May 29 21:54:07 2007] [notice] suEXEC mechanism enabled (wrapper: /opt/IBMIHS/bin/suexec)

    If I turn suexec off, that doesn't show up in the log, so it is empty.

    There is nothing in the http_plugin.log either.

    I even started apache with this option:
    -E file : log startup errors to file
    but nothing is written to that either.

    Any ideas why the process would start with no errors, but not kick off any child processes or write to a pid file?? The default IBM HTTP Server page at http://hostname:80 is not even coming up....
     
    thechickk, May 30, 2007 IP
  7. thechickk

    thechickk Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ah HA! I removed the httpd_plugin.log file and the server started up correctly. I guess it couldn't be accessed somehow even though I was starting the server as root and it was 644 and owned by root. As soon as I removed that log, it worked. How come these products don't work if they can't write to logs?? That probably should be changed...

    Any idea why when starting the process as root, I couldn't write to the log that has write permissions for root??
     
    thechickk, May 30, 2007 IP
  8. nukepuppy

    nukepuppy Peon

    Messages:
    93
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #8
    because what writes to it isnt root..
     
    nukepuppy, Jun 5, 2007 IP