custom systemd httpd service fails to start on centos 7
I have the following systemctl service
Code:
[Unit] systemctl status httpd_foobar.service â httpd_foobar.service - The Apache HTTP Server for foobar Loaded: loaded (/usr/lib/systemd/system/httpd_foobar.service; disabled; vendor preset: disabled) Active: failed (Result: timeout) since Tue 2016-02-09 15:52:06 CET; 21min ago Docs: man:httpd(8) man:apachectl(8) Process: 23622 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 23620 ExecStart=/usr/sbin/httpd -f /etc/httpd/conf.d/httpd.foobar.conf (code=exited, status=0/SUCCESS) Main PID: 23620 (code=exited, status=0/SUCCESS) Feb 09 15:50:36 web7 systemd[1]: Starting The Apache HTTP Server for foobar... Feb 09 15:50:36 web7 kill[23622]: kill: cannot find process "" Feb 09 15:50:36 web7 systemd[1]: httpd_foobar.service: control process exited, code=exited status=1 Feb 09 15:52:06 web7 systemd[1]: httpd_foobar.service stop-sigterm timed out. Killing. Feb 09 15:52:06 web7 systemd[1]: Failed to start The Apache HTTP Server for foobar. Feb 09 15:52:06 web7 systemd[1]: Unit httpd_foobar.service entered failed state is it something related to selinux? when i restart manually via the command line: it works but not when trying via systemctl. |
did you write that service file yourself?
have you looked up centos wiki, then apache wiki, then systemd documentation? (*) if this is apache, are you sure you need httpd to start it? i have a debian server and it doesn't have httpd in $PATH. (*) archwiki has always been very helpful with systemd |
Hello
I wrote the service file based in the one that comes with the rpm. i just changed the ExecStart and Execreload.. i have set up selinux as permissive but the problem is not related to selinux.. I have read the documentation of systemd. centos and apache but I did not find any hints as to whiy systemd hangs out... that Is why I reached out to see if someone has any ideas.. thanks in advance. |
undo that stuff.
try Code:
# systemctl start apache2 if that works, do Code:
# systemctl enable apache2 (*) at least this is how it works on debian stable. alternatively, i think you can also use apachectl. |
All times are GMT -5. The time now is 03:13 AM. |