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

    HAProxy will hangs when I upgrade to pfsense 2.3.4

    Scheduled Pinned Locked Moved Cache/Proxy
    39 Posts 10 Posters 8.6k 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.
    • L
      lebernd
      last edited by

      I searched my log files from the long saturday night - the only message that I could find related and suspect are problems before reboot like

      2017-05-06 23:40:30	Error (3)	PHP-CGI rc.initial.reboot: The command '/usr/local/etc/rc.d/haproxy.sh stop' returned exit code '1', the output was 'Stopping haproxy. Waiting for PIDS: 76571\. Stopping haproxy. No matching processes were found'
      

      My config is running fine after degrading to 1.7.2 - it's a very basic setup with two backends online and ssl/https frontend with sni.

      1 Reply Last reply Reply Quote 0
      • R
        ringo
        last edited by

        I reproduced the issue on a fresh install. It seems that there is a problem with DNS resolvers of haproxy.

        1. Install a fresh pfSense 2.3.4-RELEASE (amd64)
        2. Install haproxy from package manager
        3. Add a backend with your favourite web server
        3. Add a HTTP frontend, listen to any:8080, set the default backend.
        4. Check Enable HAProxy, Maximum connections: 500, Internal stats port: 2200
        5. In the DNS servers section: click new server, Name: local, DNSserver:127.0.0.1, DNSport:53
        6. Apply changes.
        7. HAProxy looks like up and running.
        8. Setup firewall rules and visit port 8080 / 2200. No response.
        9. Visit haproxy stats page few times, and webConfigurator should hang now.

        –
        EDIT: amd64.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          OK, that I can reproduce on 2.3.4 and 2.4. The key is having the DNS resolver configured inside haproxy. It appears to get hung up attempting to query the UNIX socket for stats. Even if I try to hit that manually, it never receives a response. If I start haproxy manually in the foreground (Disable daemon mode), the stats command succeeds.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

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

            I can also confirm that if I remove the DNS entries in Haproxy it no longer hangs pfsense.  However, it is still not routing the calls to any internal server.  I presume the daemon issue still exist.

            1 Reply Last reply Reply Quote 0
            • R
              ringo
              last edited by

              @cjbujold:

              However, it is still not routing the calls to any internal server.

              Does it show a 503 service unavailable error?

              –-
              EDIT: Could you try disabling ssl offloading (if enabled) and see if it work or not?

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

                Got it to work, Had a typo (SSL) and once fixed everything seems to work like normal as long as I do not add any DNS entries into haproxy.

                Thanks for all the help, much appreciated.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  FYI- Same problem with haproxy 1.7.4 on plain FreeBSD, so not specific to our package. I did just copy over the config and adjust though, so it could be in one of the directives there but nothing seems obvious yet. Still trying things out.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    Same problem with 1.7.5 also on FreeBSD.

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      OK, I reported the issue upstream and I have a lead on fixing our local copy until they can work on a fix. Won't be long now, at least for a temporary fix.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        New version of HAProxy is up which has the problematic commits removed. Works OK here with resolvers configured in HAProxy.

                        Update and give it a try.

                        https://redmine.pfsense.org/issues/7533

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • R
                          ringo
                          last edited by

                          Thank you @jimp for the update, it works great for me!

                          1 Reply Last reply Reply Quote 0
                          • jimpJ
                            jimp Rebel Alliance Developer Netgate
                            last edited by

                            @Cow:

                            Thank you @jimp for the update, it works great for me!

                            Thank YOU for finding the way to reproduce it!  ;D

                            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

                            1 Reply Last reply Reply Quote 0
                            • G
                              gjurriens
                              last edited by

                              Thank you all for resolving this issue.
                              It seemed I had the exact same problem with the DNSes in the HAproxy config.

                              I'm glad it is resolved, now I don't need to keep a putty session open anymore to keep HAproxy running.

                              1 Reply Last reply Reply Quote 0
                              • jimpJ
                                jimp Rebel Alliance Developer Netgate
                                last edited by

                                I updated the haproxy again with a new patch that seems to be a better fix. If anyone has problems with the new version, let me know.

                                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                Need help fast? Netgate Global Support!

                                Do not Chat/PM for help!

                                1 Reply Last reply Reply Quote 0
                                • D
                                  DuSt
                                  last edited by

                                  Thank you @jimp. The new version works as expected, no hanging anymore. Great job!

                                  1 Reply Last reply Reply Quote 0
                                  • N
                                    nish
                                    last edited by

                                    Sorry about the noob question in advance, but can someone please advise or point me in the right direction on how to update to the fix? I have tried a reinstall and it hasn't worked.

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