Unable to start Varnish 3 service on Centos 7

江枫思渺然 提交于 2019-12-12 06:12:38

问题


Because Varnish 3 package on Varnish's website is for RHEL 6, I was having issue installing it on Centos 7.

Varnish install https://www.varnish-cache.org/installation/redhat Varnish 3 on Centos 7 bug https://bugs.centos.org/view.php?id=7563

http://repo.varnish-cache.org/redhat/varnish-3.0/el7/ I repoint the repo to Varnish 3 for Centos 7 and was able to install Varnish 3 successfully. however, I'm having issue start and restarting the service.

[root@VR1gb ~]# service varnish restart
Restarting varnish (via systemctl):  


[root@VR1gb init.d]# systemctl restart varnishd.service
Failed to issue method call: Unit varnishd.service failed to load: No such file or directory.

[root@VR1gb init.d]# rpm -ql varnish

/etc/logrotate.d/varnish
/etc/rc.d/init.d/varnish
/etc/rc.d/init.d/varnishlog
/etc/rc.d/init.d/varnishncsa
/etc/sysconfig/varnish
/etc/varnish
/etc/varnish/default.vcl
/usr/bin/varnish_reload_vcl
/usr/bin/varnishadm
/usr/bin/varnishhist
/usr/bin/varnishlog
/usr/bin/varnishncsa
/usr/bin/varnishreplay
/usr/bin/varnishsizes
/usr/bin/varnishstat
/usr/bin/varnishtest
/usr/bin/varnishtop
/usr/lib64/varnish
/usr/lib64/varnish/libvarnish.so
/usr/lib64/varnish/libvarnishcompat.so
/usr/lib64/varnish/libvcl.so
/usr/lib64/varnish/libvgz.so
/usr/lib64/varnish/vmods
/usr/lib64/varnish/vmods/libvmod_std.so
/usr/sbin/varnishd
/usr/share/doc/varnish-3.0.6
/usr/share/doc/varnish-3.0.6/ChangeLog
/usr/share/doc/varnish-3.0.6/LICENSE
/usr/share/doc/varnish-3.0.6/README
/usr/share/doc/varnish-3.0.6/README.redhat
/usr/share/doc/varnish-3.0.6/examples
/usr/share/doc/varnish-3.0.6/examples/default.vcl
/usr/share/doc/varnish-3.0.6/examples/zope-plone.vcl
/usr/share/man/man1/varnishadm.1.gz
/usr/share/man/man1/varnishd.1.gz
/usr/share/man/man1/varnishhist.1.gz
/usr/share/man/man1/varnishlog.1.gz
/usr/share/man/man1/varnishncsa.1.gz
/usr/share/man/man1/varnishreplay.1.gz
/usr/share/man/man1/varnishsizes.1.gz
/usr/share/man/man1/varnishstat.1.gz
/usr/share/man/man1/varnishtest.1.gz
/usr/share/man/man1/varnishtop.1.gz
/usr/share/man/man3/vmod_std.3.gz
/usr/share/man/man7/varnish-cli.7.gz
/usr/share/man/man7/varnish-counters.7.gz
/usr/share/man/man7/vcl.7.gz
/var/lib/varnish
/var/log/varnish

[root@VR1gb run]# /etc/init.d/varnish status

varnish.service - LSB: start and stop varnishd
   Loaded: loaded (/etc/rc.d/init.d/varnish)
   Active: activating (start) since Fri 2015-01-23 13:59:32 EST; 57s ago
  Process: 17843 ExecStart=/etc/rc.d/init.d/varnish start (code=exited, status=0/SUCCESS    )
   CGroup: /system.slice/varnish.service
           ├─13813 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f     /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -w 50,1000,120 -u varnish -    g varni...
           └─13814 /usr/sbin/varnishd -P /var/run/varnish.pid -a :80 -f     /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -w 50,1000,120 -u varnish -    g varni...

Jan 23 13:59:32 VR1gb systemd[1]: Stopping LSB: start and stop varnishd...
Jan 23 13:59:32 VR1gb systemd[1]: Starting LSB: start and stop varnishd...
Jan 23 13:59:32 VR1gb systemd[1]: PID file /var/run/varnishd.pid not readable (yet?)     after start.
[root@VR1gb run]# /etc/init.d/varnish restart

来源:https://stackoverflow.com/questions/28116560/unable-to-start-varnish-3-service-on-centos-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!