ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Fedora 30 LAMP Web Server Varnish Cache Broken After Update

    IT Discussion
    fedora linux fedora 30 varnish cache nginx apache httpd lamp web server
    5
    10
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      If you just updated to Fedora 30 and you run a Varnish cache, you might notice that your cache stops working, and most likely this means that you are getting errors that your website is down. If you check your ports in use, using a command like netstat -tulpn you may notice that Varnish is not listening on the port that you expect it to.

      For some reason, Fedora 30 does not maintain the same configuration files as Fedora 29. A Varnish configuration that works on 29 will not carry forward to 30. On Fedora 29 we configured /etc/varnish/varnish.params to set the listening port for Varnish. But on Fedora 30 we need to edit:

      vi /etc/systemd/system/multi-user.target.wants/varnish.service
      

      In this file you need to look for the ExecStart line. This line runs Varnish and does not read the params file like it should. The port on which Varnish listens is hard coded into this file inappropriately. In mine, the port defaulted to 6081, but I wanted it on 80.

      The default line looked like this:

      ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
      

      But I had to alter it to:

      ExecStart=/usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m
      

      Then to get the changes to take effect:

      systemctl daemon-reload
      systemctl restart varnish
      
      1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller
        last edited by

        Here is a copy of a complete file:

        [Unit]
        Description=Varnish Cache, a high-performance HTTP accelerator
        After=network-online.target
        
        [Service]
        Type=forking
        KillMode=process
        
        # Maximum number of open files (for ulimit -n)
        LimitNOFILE=131072
        
        # Locked shared memory - should suffice to lock the shared memory log
        # (varnishd -l argument)
        # Default log size is 80MB vsl + 1M vsm + header -> 82MB
        # unit is bytes
        LimitMEMLOCK=85983232
        
        # Enable this to avoid "fork failed" on reload.
        TasksMax=infinity
        
        # Maximum size of the corefile.
        LimitCORE=infinity
        
        ExecStart=/usr/sbin/varnishd -a :80 -f /etc/varnish/default.vcl -s malloc,256m
        ExecReload=/usr/sbin/varnishreload
        
        [Install]
        WantedBy=multi-user.target
        
        
        1 Reply Last reply Reply Quote 0
        • ObsolesceO
          Obsolesce
          last edited by

          Wow so they just decide to up and change ports? And I thought Windows updates were bad...

          JaredBuschJ scottalanmillerS 2 Replies Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @Obsolesce
            last edited by

            @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

            Wow so they just decide to up and change ports? And I thought Windows updates were bad...

            They are worse don’t even try and say otherwise.

            ObsolesceO 1 Reply Last reply Reply Quote 0
            • ObsolesceO
              Obsolesce @JaredBusch
              last edited by

              @JaredBusch said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

              @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

              Wow so they just decide to up and change ports? And I thought Windows updates were bad...

              They are worse don’t even try and say otherwise.

              Sarcasm, I used.

              dbeatoD 1 Reply Last reply Reply Quote 0
              • dbeatoD
                dbeato @Obsolesce
                last edited by

                @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                @JaredBusch said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                Wow so they just decide to up and change ports? And I thought Windows updates were bad...

                They are worse don’t even try and say otherwise.

                Sarcasm, I used.

                It is kinda hard to follow sarcasm over text. However CentOS had same sort of issue which enabled postfix use of port 25 on the devices which didn't have it enabled before.

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Obsolesce
                  last edited by

                  @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                  Wow so they just decide to up and change ports? And I thought Windows updates were bad...

                  They accidentally hard coded to the default.

                  DashrenderD 1 Reply Last reply Reply Quote 0
                  • DashrenderD
                    Dashrender @scottalanmiller
                    last edited by

                    @scottalanmiller said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                    @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                    Wow so they just decide to up and change ports? And I thought Windows updates were bad...

                    They accidentally hard coded to the default.

                    did you report it?

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @Dashrender
                      last edited by

                      @Dashrender said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                      @scottalanmiller said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                      @Obsolesce said in Fedora 30 LAMP Web Server Varnish Cache Broken After Update:

                      Wow so they just decide to up and change ports? And I thought Windows updates were bad...

                      They accidentally hard coded to the default.

                      did you report it?

                      Unlikely.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        Worth noting that the issue comes back when you upgrade to Fedora 31 as well. Same fix still applies.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post