0

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?
1
  • This is propably related to logging. httpd reloads after logrotate. If Tomcat is running, reload fails.
    – Steffen
    Aug 14, 2017 at 7:17

1 Answer 1

0

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

2
  • Hi! Nothing in the error logs, nothing special in /usr/lib/systemd/system/httpd.service, nothing in /etc/sysconfig/httpd
    – Steffen
    Aug 10, 2017 at 12:25
  • This is strange. I have the same setup with apache and tomcat in centos 7.3. And I did the same start order with no issues. Does journalctl -xe show any more messages? Maybe after stopping both services make sure they are really stopped. Also maybe start tomcat manually instead of via systemd? /usr/local/tomcat/bin/startup.sh? Aug 10, 2017 at 12:49

You must log in to answer this question.

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