Red Hat Bugzilla – Bug 1467839
Hitch does not start on reboot of the server
Last modified: 2017-12-18 06:55:34 EST
Description of problem:
Hitch starts normally with 'systemctl start hitch' but it will not auto start on reboot, even if enabled via systemctl.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.systemctl enable hitch
2. shutdown -r now
3. wait for reboot
4. systemctl status hitch
hitch.service - Network proxy that terminates TLS/SSL connections
Loaded: loaded (/usr/lib/systemd/system/hitch.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Tue 2017-07-04 17:34:24 BST; 7s ago
Process: 1033 ExecStart=/usr/sbin/hitch --pidfile=/run/hitch/hitch.pid --config=/etc/hitch/hitch.conf (code=exited, status=0/SUCCESS)
Main PID: 1033 (code=exited, status=0/SUCCESS)
I fixed this by myself by changing Type=forking in /usr/lib/systemd/system/hitch.service and adding PIDFile=/run/hitch/hitch.pid.
I was not able to reproduce this on my freshly installed el7 system. There, hitch starts fine after boot, so I'm a bit at a loss here. Do you have several installations where this is a problem?
Have you done any other changes to hitch.service in /lib/systemd/system or /etc/systemd/system? How is hitch running if you start it with systemctl start hitch.service with an unmodified service file?
pgrep hitch | COLUMNS=200 xargs ps -o pid,command -p
With an unmodified hitch.service, hitch does not start with the --daemon switch, so it should not fork like a daemon, but stay in the foreground - for systemd, that is. Which is what the systemd devs like best. Running in daemon mode with So using Type=forking will work of course, but systemd was designed to handle forgrounded processes well (or even better).