Announcement

Collapse
No announcement yet.

Varnish 4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Varnish 4

    Hello! Im testing varnish cash, but when i install it via yum i get an old version.

    Code:
    root@[~]# 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?

  • #2
    Hello,

    Varnish is not included in our repositories, and from what I see it comes from epel repo in your yum.

    Comment


    • #3
      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]

      Comment


      • #4
        Can you please try again however provide the output of commands it recommends? There will be more useful information in them, e.g.:

        Code:
        service varnish start
        
        systemctl status varnish.service
        
        journalctl -xe

        Comment


        • #5
          #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.
          [root@cm01 ~]# journalctl -xe
          -- Defined-By: systemd
          -- Support: http://lists.freedesktop.org/mailman.../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.../systemd-devel

          Comment


          • #6
            Looks like your server is missing required libpcre.so.0 . Quite similar thread here:
            I am trying to install Varnish 4 on CentOS 7. I first added these rpm: sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm sudo rpm -iUvh http://195.220.10...


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

            Code:
            ldconfig -p | grep pcre.so
            
            ldd /usr/sbin/varnishd | grep pcre

            Comment


            • #7
              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_LI STEN_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.../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.../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.../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)

              Comment


              • #8
                I suppose you have to enable compilers in WHM , so /usr/bin/gcc could be executed by users (not just root).

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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:

                    Code:
                    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.

                    Comment

                    Working...
                    X