httpd not starting when Tomcat is running

I observe a problem when using Apache’s httpd and Tomcat on CentOS 7. Both are running on the same host, both installed from official repositories. httpd does SAML with mod_auth_mellon and proxies to the backend web app, running in Tomcat.

Initial situation:

  1. Both services are stopped

First use case:

  1. systemctl start httpd
  2. systemctl start tomcat
  3. –> works

Second use case:

  1. systemctl start tomcat
  2. systemctl start httpd
  3. –> does NOT work

Error message:

Aug 09 14:03:08 prod2.localdomain systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Aug 09 14:03:09 prod2.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Aug 09 14:03:09 prod2.localdomain kill[55952]: kill: cannot find process ""
Aug 09 14:03:09 prod2.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Aug 09 14:03:09 prod2.localdomain 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.
Aug 09 14:03:09 prod2.localdomain systemd[1]: Unit httpd.service entered failed state.
Aug 09 14:03:09 prod2.localdomain systemd[1]: httpd.service failed.

There are no port collisions, checked it with netstat -nalp. httpd is only bound to port 80, tomcat only to 8080 and 8009.

Therefore two questions:

  1. What does systemd try to kill?
  2. What is happening?

Answer

Anything in the error_log? Also check /usr/lib/systemd/system/httpd.service/httpd.service settings in systemd. Maybe there is a dependency.

Attribution
Source : Link , Question Author : Steffen , Answer Author : Tux_DEV_NULL

Leave a Comment