Results 1 to 7 of 7
  1. #1

    Unhappy Apache/httpd wont restart?

    I keep trying to restart Apache but it wont restart... I run a command line to restart it, but nothing happens. Here is what I have tried:
    -bash-3.1# chroot /home/fatehost.net/runtime_layeredpanel/
    fatehost:/# /etc/
    bash: /etc/: is a directory
    fatehost:/# /etc/init.d
    bash: /etc/init.d: is a directory
    fatehost:/# /etc/init.d/httpd-users
    Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload
    fatehost:/# /etc/init.d/httpd-users start
    Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
    no listening sockets available, shutting down
    Unable to open logs
    fatehost:/# /etc/init.d/httpd-users restart
    Forcing reload of web server: Apache2httpd (pid 5955) already running
    .
    fatehost:/# /etc/init.d/httpd-users force-reload
    Forcing reload of web server: Apache2.
    fatehost:/# /etc/init.d/httpd force-reload
    Forcing reload of web server: Apache2.
    fatehost:/# /etc/init.d/httpd-users restart
    Forcing reload of web server: Apache2httpd (pid 13475) already running
    .
    fatehost:/#
    fatehost:/# /etc/init.d/httpd-users start
    Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
    no listening sockets available, shutting down
    Unable to open logs
    fatehost:/# /etc/init.d/httpd-users stop
    Stopping web server: Apache2.
    fatehost:/#
    fatehost:/# /etc/init.d/httpd-users start
    Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
    no listening sockets available, shutting down
    Unable to open logs
    fatehost:/#
    fatehost:/# sudo /etc/init.d/httpd-users stop
    bash: sudo: command not found
    fatehost:/# su root /etc/init.d/httpd-users restart
    Forcing reload of web server: Apache2httpd (pid 20391) already running
    .
    fatehost:/# /etc/init.d/httpd-users reboot
    Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload
    fatehost:/# reboot
    WARNING: could not determine runlevel - doing soft reboot
    (it's better to use shutdown instead of reboot from the command line)
    shutdown: timeout opening/writing control channel /dev/initctl
    init: timeout opening/writing control channel /dev/initctl
    fatehost:/# WARNING: could not determine runlevel - doing soft reboot
    bash: WARNING:: command not found
    fatehost:/# (it's better to use shutdown instead of reboot from the command line)
    > shutdown: timeout opening/writing control channel /dev/initctl
    > init: timeout opening/writing control channel /dev/initctl
    >
    fatehost:/# /home/fatehost.net/runtime_layeredpanel
    bash: /home/fatehost.net/runtime_layeredpanel: No such file or directory
    fatehost:/#
    What should I do?

  2. #2
    Join Date
    Dec 2006
    Posts
    288
    How about just:

    /etc/init.d/httpd restart

  3. #3
    Join Date
    Aug 2003
    Location
    Gods Own Country
    Posts
    869
    Yea, try restarting httpd and tail log. Find out whats the message that comes in the apache logs.
    Blessen Cherian
    Follow me on twitter.com/blessenonly
    Over a decade plus in the Hosting Industry

  4. #4
    Run
    # /etc/init.d/apache2 stop

    make sure that there are no apache processes by

    # px ax|grep apache

    # /etc/init.d/apache2 start

    after that check /var/log/apache2/error_log file for any errors at the end. Better to use 'tail -f /var/log/apache2/error_log' on other console while starting apache2.

    To diagnose what the problem is you can use following way:

    # sh -x /etc/init.d/apache2 start

    it should give more information about the starting process.
    Best regards,
    AdminForces

  5. #5
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Quote Originally Posted by aldo View Post
    I keep trying to restart Apache but it wont restart... I run a command line to restart it, but nothing happens. Here is what I have tried:


    What should I do?
    Had you made any changes to the httpd.conf lately, especially Listen directive? It seems apache is not able to bind the IP to port 80.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  6. #6
    Nope, i dont touch those files, i know not too... Somehow it seems to be working now.

  7. #7
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,687
    Here's why apache won't restart (and you should really protect your IP address, hide it from public view):
    Address already in use: make_sock: could not bind to address ip:80
    Something is already listening on port 80. I bet if you tried to telnet to port 80, you'd get a response, instead of connection refused. Go ahead, try it:
    Code:
    telnet localhost 80
    If you get 'connection refused', then you're all good. Otherwise, something is there. You need to figure out what it is, probably apache itself.

    Code:
    ps xua | grep httpd
    ps xua | grep nobody
    aand kill it
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •