2

I've got a problem with apache : centos 7 + directamin + custombuild Version nginx_apache I restart my service this morning and apache doesn't start. I test ./build all or only apache....

systemctl start httpd.service
     Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.    



systemctl status httpd.service
     httpd.service - The Apache HTTP Server
   Loaded: loaded (/etc/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Wed 2014-11-12 08:26:54 CET; 3s ago
  Process: 8394 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=1/FAILURE)
 Main PID: 18796 (code=killed, signal=KILL)

Nov 12 08:26:54 s024.dedibox.fr systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 12 08:26:54 s024.dedibox.fr systemd[1]: Failed to start The Apache HTTP Server.
Nov 12 08:26:54 s024.dedibox.fr systemd[1]: Unit httpd.service entered failed state.


journalctl -xn
     -- Logs begin at Sun 2014-11-02 20:23:36 CET, end at Wed 2014-11-12 08:27:08 CET. --
Nov 12 08:27:06 s024.dedibox.fr systemd-logind[1100]: Removed session 15720.
-- Subject: A session 15720 has been terminated
-- Defined-By: systemd
-- Support: http:// lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http:// www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A session with the ID 15720 has been terminated.
Nov 12 08:27:07 s024.dedibox.fr systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http:// lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Nov 12 08:27:08 sd024.dedibox.fr systemd[1]: httpd.service: control process exited, code=exited status=1
Nov 12 08:27:08 sd024.dedibox.fr systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http:// lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Nov 12 08:27:08 sd024.dedibox.fr systemd[1]: Unit httpd.service entered failed state.

thanks for your help


httpd logs :

[Wed Nov 12 10:51:08.003271 2014] [ssl:warn] [pid 22968:tid 140503118493760] AH01909: www.example.com:8081:0 server certificate does NOT include an ID which matches the server name 
[Wed Nov 12 10:51:08.003428 2014] [suexec:notice] [pid 22968:tid 140503118493760] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) 
[Wed Nov 12 10:51:08.003443 2014] [core:emerg] [pid 22968:tid 140503118493760] (28)No space left on device: AH00023: Couldn't create the rewrite-map mutex AH00016: Configuration Failed
2
  • 2
    Try starting manually apache command. /usr/sbin/httpd -k start . It may give you more information about error. Nov 12, 2014 at 9:26
  • /usr/sbin/httpd -k start No error
    – Jojo
    Nov 12, 2014 at 10:05

3 Answers 3

2

The problem was NOT really caused by a lack of space on the disk but by lack of semaphores.

See http://major.io/2007/08/24/apache-no-space-left-on-device-couldnt-create-accept-lock/ for more information.

Thanks so much for your help

0

Ensure that you didn't make any wrong entry in httpd.conf file

after that restart the service

service httpd restart

1
  • Although generally true (and you might point out that an admin can test the config with apachectl configtest) , that is not not the cause in this case. The error No space left on device: AH00023: Couldn't create the rewrite-map mutex is not an error in the config, but the OP had run out of diskspace...
    – HBruijn
    Nov 7, 2016 at 12:46
0

I experienced this problem when I moved from using a manual Apache 2.4 start and restart to one enabled by systemctl. I never had a space issue, but it turned out to be semaphores anyway.

The key is in the line:

Main PID: 18796 (code=killed, signal=KILL)

When I used

httpd -k start

everything worked fine. However, when I enabled the service in systemctl, the semaphores locked.

I fixed it by following the instructions found here: What is a semaphore and how to clear them for Apache

Also, a cron script for clearing semaphores here: Script to automate clearing semaphores

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .