Can't restart Apache2.. httpd (pid #) not running

Discussion in 'Installation/Configuration' started by Geoinline, Nov 23, 2006.

  1. Geoinline

    Geoinline New Member

    When I type /etc/init.d/apache2 restart in the shell as root I get
    Code:
    httpd (pid 24649?) not running
    (98)Address already in use: make_sock: could not bind to address [::]:443
    no listening sockets available, shutting down
    Unable to open logs
    
    the out put of netstat -tap is
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     21342/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     6058/ispconfig_http
    tcp        0      0 *:ftp                   *:*                     LISTEN     23659/proftpd: (acc
    tcp        0      0 localhost.domain:domain *:*                     LISTEN     21729/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     21729/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     23796/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     21729/named
    tcp6       0      0 *:imaps                 *:*                     LISTEN     21469/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     21174/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     21120/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     21423/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     24705/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     20549/sshd
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     21729/named
    tcp6       0      0 *:https                 *:*                     LISTEN     24705/apache2
    tcp6       0      0 localhost.domain:ssh ::ffff:192.168.15:59572 ESTABLISHED21601/sshd: admin [
    
    Clearly apache2 is indeed running. So why is it lieing to me? Why does it say it's not running? Is it looking at the wrong pid? Why would it do that? Should I try restarting the whole system?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Which distribution do you use?

    Did you try
    Code:
    /etc/init.d/apache2 stop
    to stop it? If it doesn't help, try
    Code:
    kill -9 [I]pid[/I]
    where pid is the process ID that you see in the netstat output. Also check Apache's error log for errors.
     
  3. Geoinline

    Geoinline New Member

    Work around

    I simply rebooted the whole machine. Now; stop, restart, start all work fine.
     
  4. K_meleonu

    K_meleonu Member

    Same problem

    Hi,
    I saw the same problem on my machine, triyed to do it work but no success. I have rebooted the machine and now when i want to start httpd i get:

    [root@CrazyDesign ~]# service httpd start
    Starting httpd: [FAILED]


    I user Fedora Core 4 and untill last night all work't perfect.

    Does anyone have any ideas how to make it work again?

    Thank you all
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    httpd -t

    any errors in the apache error log?
     
  6. K_meleonu

    K_meleonu Member

    [root@CrazyDesign httpd]# httpd -t
    Syntax OK


    I found somme errors:
    In: ispconfig_access_log_2007_02_14 i found the folowing line wich is repeating on and on

    CrazyDesign.ath.cx||||309||||195.99.171.18 - - [14/Feb/2007:00:52:09 +0200] "GET /cgi-bin/awstats/falsepositive.muie HTTP/1.1" 404 310 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"

    In error_log i have:
    [error] [client 86.106.143.102] Directory index forbidden by rule: /var/www/html/
    and it keep's going on and on and on

    I also found
    [Sun Jan 07 04:07:04 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match
    server name!?

    in /var/log/httpd/ssl_error_log
     
    Last edited: Feb 14, 2007
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, these errors are all non critical:

    Please try:

    /etc/init.d/apache restart
    /etc/init.d/apache2 restart
    /etc/init.d/httpd restart

    Only one of the lines is correct, but this depends on your linux distribution. But it does not hurt if you execute all three lines, for 2 of them you will get file not found errors.
     
  8. K_meleonu

    K_meleonu Member

    Here is what i get:

    [root@CrazyDesign ~]# /etc/init.d/apache restart
    -bash: /etc/init.d/apache: No such file or directory
    [root@CrazyDesign ~]# /etc/init.d/apache2 restart
    -bash: /etc/init.d/apache2: No such file or directory
    [root@CrazyDesign ~]# /etc/init.d/httpd restart
    Stopping httpd: [FAILED]
    Starting httpd: [FAILED]


    I have Fedora Core 4


    I also have this:
    [Wed Feb 14 03:57:55 2007] [notice] caught SIGTERM, shutting down [Wed
    Feb 14 03:58:02 2007] [notice] Apache/1.3.34 (Unix) PHP/5.1.2 mod_ssl/2.8.25 OpenSSL/0.9.8a configured -- resuming
    normal operations [Wed Feb 14 03:58:02 2007] [notice] Accept mutex: sysvsem (Default: sysvsem) [Wed Feb 14 04:11:20
    2007] [notice] caught SIGTERM, shutting down [Wed Feb 14 04:11:29 2007] [notice] Apache/1.3.34 (Unix) PHP/5.1.2
    mod_ssl/2.8.25 OpenSSL/0.9.8a configured -- resuming normal operations [Wed Feb 14 04:11:29 2007] [notice] Accept
    mutex: sysvsem (Default: sysvsem) [Wed Feb 14 04:20:51 2007] [crit] (98)Address already in use: make_sock: could not
    bind to port 81 df: `/var/named/chroot/proc': Permission denied df: `/var/named/chroot/proc': Permission denied df:
    `/var/named/chroot/proc': Permission denied df: `/var/named/chroot/proc': Permission denied df:
    `/var/named/chroot/proc': Permission denied df: `/var/named/chroot/proc': Permission denied du:
    `/home/www/web11/user/alex/Maildir': Permission denied df: `/var/named/chroot/proc': Permission denied df:
    `/var/named/chroot/proc': Permission denied [Wed Feb 14 13:14:17 2007] [notice] caught SIGTERM, shutting down [Wed
    Feb 14 13:14:26 2007] [notice] Apache/1.3.34 (Unix) PHP/5.1.2 mod_ssl/2.8.25 OpenSSL/0.9.8a configured -- resuming
    normal operations [Wed Feb 14 13:14:26 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)

    in /root/ispconfig/httpd/logs/error_log


    I found th problem. One of the clients installed a bad script witch was creating those problems.
    Thank you,
     
    Last edited: Feb 15, 2007
  9. mtoom

    mtoom New Member

    my server is screwed, can someone help?


    error log ...

    any ideas?!?!?!?
     
  10. mtoom

    mtoom New Member

    Stopping httpd: [FAILED]
    Starting httpd: [FAILED]

    shutdown -r now

    and httpd still fails to start after reboot.

    Stopping httpd: [FAILED]
    Starting httpd: [FAILED]


    Any help!?
     
  11. mtoom

    mtoom New Member

    bump

    bump bump bump bump bump bump bump bump bump bump bump bump bump bump bump bump
     
  12. mtoom

    mtoom New Member

    i really need help. can anyone help me...
     
  13. mtoom

    mtoom New Member

    now this has shown up. i tried redoing the key but i still cant start httpd after rebooting ispconfig
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

  15. mtoom

    mtoom New Member

    will try this again although i have tried several times...

    notice this in the SSL log...

    [Tue Feb 27 02:08:26 2007] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?


    makes http:// work properly... but https:// login doesnt work

    however,

    makes SSL login work properly on https:// and http:// works, but instead of showing the website, it redirects to a login.php file...

    !??!

    always results in [FAILED]
     
    Last edited: Feb 27, 2007
  16. mtoom

    mtoom New Member

    i dont know if SSL is causing the problem...

    i have reinstalled now twice and tried everything but it wont work properly...

    i made a new SSL cert and it made no difference
     
  17. mtoom

    mtoom New Member

    everything seems to be working but it doesnt respond on port 80...
     
  18. mtoom

    mtoom New Member

  19. falko

    falko Super Moderator Howtoforge Staff

    It seems as if ISPConfig is listening on port 81 instead of 80. Did you modify anything in /root/ispconfig/httpd/conf/httpd.conf?
     

Share This Page