Лак 4
Форум
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Cristian Beckerle
  2. Thursday, 24 September 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. 27.09.2015 11:09:44
  2. # 1
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hello,

Varnish is not included in our repositories, and from what I see it comes from \'epel repo in your yum.
  1. 31.01.2017 13:01:52
  2. # 2
Wade Accepted Answer
Posts: 0
Joined: 21.10.2019
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. 31.01.2017 18:01:04
  2. # 3
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Can you please try again however provide the output of commands it recommends? There will be more useful information in them, e.g.:


service varnish start
systemctl status varnish.service
journalctl -xe
  1. 07.02.2017 11:02:54
  2. # 4
Wade Accepted Answer
Posts: 0
Joined: 21.10.2019
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:57
  2. # 5
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Looks like your server is missing required libpcre.so.0 . Quite similar thread here:
http://serverfault.com/questions/655346/cannot-install-varnish-on-centos-7

You may follow above thread, or let me know the following outputs:

ldconfig -p | grep pcre.so
ldd /usr/sbin/varnishd | grep pcre
  1. 07.02.2017 12:02:42
  2. # 6
Wade Accepted Answer
Posts: 0
Joined: 21.10.2019
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:17
  2. # 7
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
I suppose you have to enable 'compilers' in WHM , so /usr/bin/gcc could be executed by users (not just root).
  1. 07.02.2017 12:02:20
  2. # 8
Wade Accepted Answer
Posts: 0
Joined: 21.10.2019
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.
  1. 07.02.2017 13:02:12
  2. # 9
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
I am not a varnish expert, however suppose it use own user for services, and most probably compilers are needed only for startup task. You may take a user with something like:

ps axuwww | grep varnishd


From other side.. as long as you use CageFS - you are safe providing executable permissions for compilers. Also, our ruby/python selector also needs them.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
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.