Description of problem: systemctl start varnish.service hangs on start even though it is working in the background and also the systemctl stop varnish.service does not stop the service Version-Release number of selected component (if applicable): varnish-4.0.0-3.el7.x86_64 How reproducible: Simple to reproduce. Install varnish and then start the service using systemctl start varnish.service Steps to Reproduce: 1. yum install varnish 2. systemctl start varnish.service (will hang and report it timed out and failed) 3. ps faxw (will show varnish is actually running 4. systemctl stop varnish (looks like it completes ok but service does not stop) 5. ps faxw (you should still see varnish running and accepting connections even though systemctl status varnish.service claims the service is stopped. Actual results: systemctl start varnish.service (will hang and report it timed out and failed) ps faxw (will show varnish is actually running) systemctl stop varnish (looks like it completes ok but service does not stop) ps faxw (shows varnish still running) Expected results: when issuing systemctl start varnish.service it should not hang when issuing systemctl stop varnish.service it should stop the running service Additional info: I believe this has been fixed on Fedora 20 based on some google searches but have not tested it yet.
Btw i was able to fix this by creating a systemd service script attached below. Obviously this probably needs some work since i just created it and have no experience with systemd in general. vim /usr/lib/systemd/system/varnish.service [Unit] Description=High-performance HTTP accelerator [Service] Type=oneshot ExecStart=/etc/init.d/varnish start ExecStop=/etc/init.d/varnish stop ExecStatus=/etc/init.d/varnish status RemainAfterExit=yes [Install] WantedBy=multi-user.target
Actually this should be somewhat more relevant [Unit] Description=High-performance HTTP accelerator [Service] Type=oneshot ExecStart=/etc/init.d/varnish start ExecStop=/etc/init.d/varnish stop RemainAfterExit=yes [Install] WantedBy=multi-user.target
I also am having trouble getting varnish to work. After installing varnish i issue 'systemctl start varnish' and get the following Job for varnish.service failed. See 'systemctl status varnish.service' and 'journalctl -xn' for details. systemctl status varnish shows the following: varnish.service - LSB: start and stop varnishd Loaded: loaded (/etc/rc.d/init.d/varnish) Active: failed (Result: exit-code) since Tue 2014-07-29 10:54:59 EDT; 10s ago Process: 2105 ExecStart=/etc/rc.d/init.d/varnish start (code=exited, status=1/FAILURE) I also tried creating the varnish.service file from comment 2, but it still failed to start and i couldn't find any more detailed information.
The systemd files for fedora should be used, and it's just a stupid packaging bug that they weren't included in the epel7 package in the first place. I'll roll an update with systemd support and an update to 4.0.1 today. Ingvar
varnish-4.0.1-2.el7 was built yesterday, and should fix this issue. The package is available at http://koji.fedoraproject.org/koji/buildinfo?buildID=549140 , and should hit the mirrors within a few days. Note that there is a selinux policy in centos7 prohibiting varnish from starting properly. It works well with selinux switched off. I haven't tested this on rhel7. I'll post a bug for this as well. Ingvar
varnish-4.0.1-2.el7 works for me when i disable selinux as you noted. Can you give me the link to the selinux bug (if you created it already) so that i can follow that as well?
David, the selinux bug prohibiting varnishd from starting: #1125165 Ingvar