failed to start apache2 gracefully

5,801

You need superuser privileges to interact with service utility. Using sudo solves the problem:

sudo service apache2 reload
Share:
5,801

Related videos on Youtube

Registered User
Author by

Registered User

Updated on September 18, 2022

Comments

  • Registered User
    Registered User over 1 year

    Here is a new installation of apache2 on a Ubuntu 12.04 machine (home user)

    I am trying to start the service apache2 after creating a file in sites-available directory and enabling the website I am getting following error

    user@ubuntu:/etc/apache2/sites-enabled$ service apache2 reload
     * Reloading web server config apache2                                                                                                                /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
    httpd not running, trying to start
    (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    Action 'graceful' failed.
    The Apache error log may have more information.
                                                                                                                                                   [fail]
    

    Now there I do not find any thing in apache log as such but posting here error.log

    [Tue Jun 11 22:14:09 2013] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
    [Tue Jun 11 22:14:14 2013] [notice] caught SIGTERM, shutting down
    [Tue Jun 11 22:14:15 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
    [Tue Jun 11 22:16:41 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
    [Wed Jun 12 16:02:54 2013] [notice] caught SIGTERM, shutting down
    [Wed Jun 12 17:03:45 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
    [Wed Jun 12 23:04:19 2013] [notice] Graceful restart requested, doing restart
    [Wed Jun 12 23:04:23 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3 with Suhosin-Patch configured -- resuming normal operations
    [Thu Jun 13 00:09:50 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
    [Thu Jun 13 00:43:26 2013] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
    

    and here is access.log

    127.0.0.1 - - [11/Jun/2013:22:16:40 +0530] "GET / HTTP/1.1" 200 483 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [11/Jun/2013:22:16:41 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
    127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
    127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
    127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
    127.0.0.1 - - [12/Jun/2013:23:04:19 +0530] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
    127.0.0.1 - - [13/Jun/2013:00:09:49 +0530] "GET / HTTP/1.1" 200 483 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:09:50 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:43:25 +0530] "GET /tshirtshop HTTP/1.1" 301 555 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:43:25 +0530] "GET /tshirtshop/ HTTP/1.1" 200 646 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /icons/blank.gif HTTP/1.1" 200 437 "http://localhost/tshirtshop/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /icons/back.gif HTTP/1.1" 200 506 "http://localhost/tshirtshop/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    127.0.0.1 - - [13/Jun/2013:00:43:26 +0530] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"
    

    what is wrong with apache2 service that it is unable to start ....

    • Eric Carvalho
      Eric Carvalho almost 11 years
      A missing sudo? sudo service apache2 reload?
    • gertvdijk
      gertvdijk almost 11 years
      Not running Apache with root privileges but as user also explains why you don't see anything in the logs - the permissions on those log files don't permit that.