Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Varnish stops working after few days

    Scheduled Pinned Locked Moved pfSense Packages
    23 Posts 3 Posters 7.5k Views
    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.
    • X
      xudus
      last edited by

      Something is really screwed up. I disabled varnish in gui and I'm still able to access the server behind pfs! Mind you, I still have original issue with being presented with the first backend regardless of the domain being access.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Check if there is a remain nat that forward requests to this first server.

        With varnish stopped, you can't be able to reach backends.

        Also check on system -> advanced if webgui redirect rule is disabled.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • X
          xudus
          last edited by

          No NAT and webgui is disabled.

          As I stated in the first post. Everything is working properly after the reboot. This system was running for almost two weeks w/o issues.

          Not sure if it matters, but varnish was installed first then two weeks after squid & squidguard was installed. Could the order of installation make difference?

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            @xudus:

            Not sure if it matters, but varnish was installed first then two weeks after squid & squidguard was installed. Could the order of installation make difference?

            Probably not.
            There is something really weird on this setup. With varnish stopped, you can get access to port 80 so how could it forward to internal host????

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • X
              xudus
              last edited by

              Had the same behavior on previous box, so I rebuild the whole solution on the new box. The issue showed up on the new build. Two different boxes with this bug.

              Just rebooted pfs. Everything is working. The question is for how long. I have a feeling that it has to do with squid/squidguard. I guest next time it happens, I'll remove squid/squidguard and see if it'll make a difference.

              1 Reply Last reply Reply Quote 0
              • X
                xudus
                last edited by

                It happen again! 10 days after the reboot varnish is malfunctioning.

                1 Reply Last reply Reply Quote 0
                • C
                  canefield
                  last edited by

                  Dear all,

                  I encounter the same problems…after a couple of days Varnish is stopped and won't come online until a reboot of pfSense. Then again a couple days later the system doesn't respond to my external requests. How come?

                  Thanks,
                  Canefield

                  1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    Is there any log or alert or message during manual service restart to help on identifying this problem?

                    I`m using it on amd64 for a long time without crashes.

                    att,
                    Marcello Coutinho

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • C
                      canefield
                      last edited by

                      Yes, after a couple of tests the following error emerge:

                      "php: : The command '/usr/local/etc/rc.d/varnish.sh' returned exit code '2', the output was 'kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 -> 16384 kern.maxfiles: 131072 -> 131072 kern.maxfilesperproc: 104856 -> 104856 kern.threads.max_threads_per_proc: 4096 -> 4096 NB: Storage size limited to 2GB on 32 bit architecture, NB: otherwise we could run out of address space. Message from VCC-compiler: Reference to unknown backend 'CANLB' at ('input' Line 55 Pos 28) .backend = CANLB; –-------------------------###########- In director specification starting at: ('input' Line 53 Pos 1) director CA client { ########------------ Running VCC-compiler failed, exit 1 VCL compilation failed'"

                      Thanks a lot,
                      Canefield

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        canefield,

                        something is messing up config:

                        Message from VCC-compiler: Reference to unknown backend 'CANLB' at ('input' Line 55 Pos 28) .backend = CANLB; –-------------------------###########-
                        In director specification starting at: ('input' Line 53 Pos 1) director CA client { ########------------ Running VCC-compiler failed, exit 1 VCL compilation failed'"

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • X
                          xudus
                          last edited by

                          marcelloc, is there any particular command that I could run that would help with finding the root cause?

                          TIA,
                          Dave

                          1 Reply Last reply Reply Quote 0
                          • marcellocM
                            marcelloc
                            last edited by

                            xudus,

                            try to run the startup command on console/ssh

                            /usr/local/etc/rc.d/varnish.sh restart

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • X
                              xudus
                              last edited by

                              This is what I'm getting:

                              
                              kern.ipc.nmbclusters: 65536
                              sysctl: kern.ipc.nmbclusters: Invalid argument
                              kern.ipc.somaxconn: 16384 -> 16384
                              kern.maxfiles: 131072 -> 131072
                              kern.maxfilesperproc: 104856 -> 104856
                              kern.threads.max_threads_per_proc: 4096 -> 4096
                              storage_malloc: max size 128 MB.
                              Using old SHMFILE
                              
                              
                              1 Reply Last reply Reply Quote 0
                              • marcellocM
                                marcelloc
                                last edited by

                                @xudus:

                                This is what I'm getting:

                                There is no varnish fatal errors on this log, so it should be runinng.

                                Treinamentos de Elite: http://sys-squad.com

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • X
                                  xudus
                                  last edited by

                                  Sorry, it is running as I just restarted pfs. I'll post the output when it'll malfunction next time.

                                  1 Reply Last reply Reply Quote 0
                                  • X
                                    xudus
                                    last edited by

                                    marcelloc, it did it again.

                                    The output from /usr/local/etc/rc.d/varnish.sh restart is same as before (no errors). Is there any other place that I could poke to see what is braking varnish?

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      xudus,

                                      check with netstat -an if varnish port are still up
                                      check with ps ax | grep -i varnish if varnish is still running.

                                      You can also create a cron job to restart varnish after two days for example to prevent this random error.

                                      att,
                                      Marcello Coutinho

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • X
                                        xudus
                                        last edited by

                                        Marcello,

                                        Varnish is running and port 80 listening (*.80). Restarting varnish does not help. Restarting pfs does.

                                        1 Reply Last reply Reply Quote 0
                                        • X
                                          xudus
                                          last edited by

                                          I disabled squidGuard (1.4_2 pkg v.1.9.1) and everything is working so far for the last 14 days. I'll give it another week or two before re-enabling squidGuard again.

                                          1 Reply Last reply Reply Quote 0
                                          • X
                                            xudus
                                            last edited by

                                            After 20 days varnish goes belly up. Will be removing squid and squidGuard to see what difference it makes. There is no love between those three.

                                            BTW does anybody have pfBlocker, pfflowd, squid, squidGuard and Varnish installed and stable on pfs 2.0.1?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.