Varnish 4
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Cristian Beckerle
  2. 24.09.2015
  3.  Subscribe via email
Hello! Im testing varnish cash, but when i install it via yum i get an old version. 
[email protected][~]# yum install varnish
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, rhnplugin, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                            |  12 kB     00:00     
 * cloudlinux-x86_64-server-6: xmlrpc.cln.cloudlinux.com
 * epel: mirror.utexas.edu
cloudlinux-x86_64-server-6                               | 1.0 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package varnish.x86_64 0:2.1.5-5.el6 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


================================================================================
 Package           Arch             Version                Repository      Size
================================================================================
Installing:
 varnish           x86_64           2.1.5-5.el6            epel           264 k


Transaction Summary
================================================================================
Install       1 Package(s)

This comes from the cloudlinux repository? Can i install a newer version?
Rate this post:
  1. 31.01.2017 13:01:52
  2. # 1
Wade Accepted Answer
Posts: 0
Joined: 07.06.2020
0
Votes
Undo
Hi,

When I attempt the varnish installation with CloudLinux it returns the following:

service varnish start
Starting varnish (via systemctl): Job for varnish.service failed because the control process exited with error code. See "systemctl status varnish.service" and "journalctl -xe" for details.
[FAILED]
  1. 07.02.2017 11:02:54
  2. # 2
Wade Accepted Answer
Posts: 0
Joined: 07.06.2020
0
Votes
Undo
#service varnish start

Starting varnish (via systemctl): Job for varnish.service failed because the control process exited with error code. See "systemctl status varnish.service" and "journalctl -xe" for details.
[FAILED]

#systemctl status varnish.service

varnish.service - LSB: start and stop varnishd
Loaded: loaded (/etc/rc.d/init.d/varnish; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-02-07 13:42:09 SAST; 1min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 921318 ExecStart=/etc/rc.d/init.d/varnish start (code=exited, status=1/FAILURE)

Feb 07 13:42:09 [servername] systemd[1]: Starting LSB: start and stop varnishd...
Feb 07 13:42:09 [servername] varnish[921318]: Starting Varnish Cache: /usr/sbin/varnishd: error while loading shared libraries: libpcre.so.0: can...directory
Feb 07 13:42:09 [servername] varnish[921318]: [17B blob data]
Feb 07 13:42:09 [servername] systemd[1]: varnish.service: control process exited, code=exited status=1
Feb 07 13:42:09 [servername] systemd[1]: Failed to start LSB: start and stop varnishd.
Feb 07 13:42:09 [servername] systemd[1]: Unit varnish.service entered failed state.
Feb 07 13:42:09 [servername] systemd[1]: varnish.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

#journalctl -xe

varnish.service - LSB: start and stop varnishd
Loaded: loaded (/etc/rc.d/init.d/varnish; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-02-07 13:48:55 SAST; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 923133 ExecStart=/etc/rc.d/init.d/varnish start (code=exited, status=1/FAILURE)

Feb 07 13:48:55 [servername] systemd[1]: Starting LSB: start and stop varnishd...
Feb 07 13:48:55 [servername] varnish[923133]: Starting Varnish Cache: /usr/sbin/varnishd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No...or directory
Feb 07 13:48:55 [servername] varnish[923133]: [17B blob data]
Feb 07 13:48:55 [servername] systemd[1]: varnish.service: control process exited, code=exited status=1
Feb 07 13:48:55 [servername] systemd[1]: Failed to start LSB: start and stop varnishd.
Feb 07 13:48:55 [servername] systemd[1]: Unit varnish.service entered failed state.
Feb 07 13:48:55 [servername] systemd[1]: varnish.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[[email protected] ~]# journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-1005.slice has begun shutting down.
Feb 07 13:48:59 [servername] systemd-logind[520]: Failed to remove runtime directory /run/user/1005: Device or resource busy
Feb 07 13:49:01 [servername] systemd[1]: Started Session 33458 of user root.
-- Subject: Unit session-33458.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  1. 07.02.2017 12:02:42
  2. # 3
Wade Accepted Answer
Posts: 0
Joined: 07.06.2020
0
Votes
Undo
So I went through the suggestions in the link provided. I have new output errors however:

# service varnish start
Redirecting to /bin/systemctl start varnish.service
Job for varnish.service failed because the control process exited with error code. See "systemctl status varnish.service" and "journalctl -xe" for details.

# systemctl status varnish.service
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/usr/lib/systemd/system/varnish.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-02-07 14:34:57 SAST; 1min 3s ago
Process: 13168 ExecStart=/usr/sbin/varnishd -P /var/run/varnish.pid -f $VARNISH_VCL_CONF -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} -S $VARNISH_SECRET_FILE -s $VARNISH_STORAGE $DAEMON_OPTS (code=exited, status=126)

Feb 07 14:34:57 [servername] systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Feb 07 14:34:57 [servername] varnishd[13168]: Message from C-compiler:
Feb 07 14:34:57 [servername] varnishd[13168]: /bin/sh: /usr/bin/gcc: Permission denied
Feb 07 14:34:57 [servername] varnishd[13168]: /bin/sh: line 0: exec: /usr/bin/gcc: cannot execute: Permissio...nied
Feb 07 14:34:57 [servername] varnishd[13168]: Running C-compiler failed, exited with 126
Feb 07 14:34:57 [servername] varnishd[13168]: VCL compilation failed
Feb 07 14:34:57 [servername] systemd[1]: varnish.service: control process exited, code=exited status=126
Feb 07 14:34:57 [servername] systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Feb 07 14:34:57 [servername] systemd[1]: Unit varnish.service entered failed state.
Feb 07 14:34:57 [servername] systemd[1]: varnish.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

# journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit varnish.service has begun starting up.
Feb 07 14:37:24 [servername] varnishd[14183]: Message from C-compiler:
Feb 07 14:37:24 [servername] varnishd[14183]: /bin/sh: /usr/bin/gcc: Permission denied
Feb 07 14:37:24 [servername] varnishd[14183]: /bin/sh: line 0: exec: /usr/bin/gcc: cannot execute: Permission denie
Feb 07 14:37:24 [servername] varnishd[14183]: Running C-compiler failed, exited with 126
Feb 07 14:37:24 [servername] varnishd[14183]: VCL compilation failed
Feb 07 14:37:24 [servername] systemd[1]: varnish.service: control process exited, code=exited status=126
Feb 07 14:37:24 [servername] systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
-- Subject: Unit varnish.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit varnish.service has failed.
--
-- The result is failed.
Feb 07 14:37:24 [servername] systemd[1]: Unit varnish.service entered failed state.
Feb 07 14:37:24 [servername] systemd[1]: varnish.service failed.
Feb 07 14:37:24 [servername] polkitd[515]: Unregistered Authentication Agent for unix-process:14166:191166 (system
Feb 07 14:37:24 [servername] dbus[525]: [system] Successfully activated service 'org.freedesktop.timedate1'
Feb 07 14:37:24 [servername] dbus-daemon[525]: dbus[525]: [system] Successfully activated service 'org.freedesktop.
Feb 07 14:37:24 [servername] systemd[1]: Started Time & Date Service.
-- Subject: Unit systemd-timedated.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

And the output from the two new commands:

# ldconfig -p | grep pcre.so
libpcre.so.1 (libc6,x86-64) => /lib64/libpcre.so.1
libpcre.so (libc6,x86-64) => /lib64/libpcre.so

# ldd /usr/sbin/varnishd | grep pcre
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f8e1ff44000)
  1. 07.02.2017 12:02:20
  2. # 4
Wade Accepted Answer
Posts: 0
Joined: 07.06.2020
0
Votes
Undo
Aha you beautiful human!

That worked!

Okay so now my question is, which users would require compiler privileges in order for varnish to function correctly. I do not want compilers enabled for everyone.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.