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

    haproxy broken after update to 2.8.0: nbproc is not supported any more...

    Scheduled Pinned Locked Moved Cache/Proxy
    47 Posts 18 Posters 9.8k 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.
    • P
      Pierre 0
      last edited by

      This problem still happens in pfsense+ 23.05.1-RELEASE (arm64) built on Wed Jun 28 03:57:42 UTC 2023 FreeBSD 14.0-CURRENT,
      with package HAProxy net 0.62_1 / haproxy-2.7.6.

      The fix presented in this thread works fine.

      SjMS K 2 Replies Last reply Reply Quote 2
      • C
        cforker
        last edited by

        Hi,

        Today I updated the HAPROXY package as it was informing to update. After updating the package all my addresses are not accessible any more and the service stopped. It is not possible to start the service. When saving the config I get the following:

        Errors found while starting haproxy
        [NOTICE] (47115) : haproxy version is 2.7.8-58c657f
        [NOTICE] (47115) : path to executable is /usr/local/sbin/haproxy
        [ALERT] (47115) : config : parsing [/var/etc/haproxy_test/haproxy.cfg:8] : nbproc is not supported any more since HAProxy 2.5. Threads will automatically be used on multi-processor machines if available.
        [ALERT] (47115) : config : Error(s) found in configuration file : /var/etc/haproxy_test/haproxy.cfg
        [ALERT] (47115) : config : Fatal errors found in configuration.

        I tried commenting out the nbproc in the .cfg but still not able to start the service.

        Anyone any idea how to fix this and where?

        Thanx in advance

        1 Reply Last reply Reply Quote 0
        • M
          machbot @royjones
          last edited by

          @royjones Better to apply the fix manually mentioned on the github marge request as shared by @davidi, manual edits to the .cfg as suggested by @nartn isn't persistent across reboots.

          1 Reply Last reply Reply Quote 1
          • C
            cforker
            last edited by cforker

            Hi,

            Today I updated the HAPROXY package as it was informing to update. After updating the package all my addresses are not accessible any more and the service stopped. It is not possible to start the service. When saving the config I get the following:

            Errors found while starting haproxy
            [NOTICE] (47115) : haproxy version is 2.7.8-58c657f
            [NOTICE] (47115) : path to executable is /usr/local/sbin/haproxy
            [ALERT] (47115) : config : parsing [/var/etc/haproxy_test/haproxy.cfg:8] : nbproc is not supported any more since HAProxy 2.5. Threads will automatically be used on multi-processor machines if available.
            [ALERT] (47115) : config : Error(s) found in configuration file : /var/etc/haproxy_test/haproxy.cfg
            [ALERT] (47115) : config : Fatal errors found in configuration.

            I tried commenting out the nbproc in the .cfg but still not able to start the service.

            Anyone any idea how to fix this and where?

            Thanx in advance

            1 Reply Last reply Reply Quote 1
            • C
              cforker
              last edited by

              Ok, found a temporary solution:

              ssh to pfsense
              
              edit /var/etc/haproxy/haproxy.cfg and delete the line "nbproc 1"
              
              run haproxy from command line: haproxy -f /var/etc/haproxy/haproxy.cfg
              

              Should be good to go for the time being.

              Chris

              1 Reply Last reply Reply Quote 1
              • C
                cforker
                last edited by

                Ok,

                temporary solution found:

                ssh to pfsense
                
                edit /var/etc/haproxy/haproxy.cfg and delete the line "nbproc 1"
                
                run haproxy from command line: haproxy -f /var/etc/haproxy/haproxy.cfg
                

                Would be nice if there will be a permanent solution.

                Cheers,

                Chris

                1 Reply Last reply Reply Quote 1
                • SjMS
                  SjM @Pierre 0
                  last edited by

                  @Pierre-0 Ditto for me. But when will this be properly patched?

                  1 Reply Last reply Reply Quote 1
                  • K
                    kiddsupreme @Pierre 0
                    last edited by

                    @Pierre-0

                    Can you tell me how you applied the update from above? I'm in the haproxy.inc file, but I am not sure exactly "where" I should place that information. Perhaps if you have a screenshot of how you placed it so I have something to reference? I appreciate the help!

                    SjMS 1 Reply Last reply Reply Quote 0
                    • M
                      michmoor LAYER 8 Rebel Alliance
                      last edited by michmoor

                      The fix with the edit of the .cfg didnt work for me. I tried restarting the service and got the following error
                      This is a very bad package update...

                      edit: i was expecting to re-apply my changes again which breaks the package. So after i run haproxy -f /var/etc/haproxy/haproxy.cfg then everything works but you cannot make any further changes in the GUI until theres a fix

                      haproxy: startup error output!: [NOTICE] (94268) : haproxy version is 2.7.6-4dadaaa[NOTICE] (94268) : path to executable is /usr/local/sbin/haproxy[ALERT] (94268) : config : parsing [/var/etc/haproxy/haproxy.cfg:9] : nbproc is not supported any more since HAProxy 2.5. Threads will automatically be used on multi-processor machines if available.[ALERT] (94268) : config : Error(s) found in configuration file : /var/etc/haproxy/haproxy.cfg[ALERT] (94268) : config : Fatal errors found in configuration.
                      

                      Firewall: NetGate,Palo Alto-VM,Juniper SRX
                      Routing: Juniper, Arista, Cisco
                      Switching: Juniper, Arista, Cisco
                      Wireless: Unifi, Aruba IAP
                      JNCIP,CCNP Enterprise

                      1 Reply Last reply Reply Quote 1
                      • C
                        Cylosoft
                        last edited by

                        I just came to report this also. I couldn't get the fix mentioned to work. I'm just running defaults for threading so I removed the lines that wrote out nbproc and nbthread. So I removed these starting at 1495.

                        	// Set numprocs if defined or use system default (#cores)
                        	$numprocs = $a_global['nbproc'] ? $a_global['nbproc'] : "1";
                        	$numthread = $a_global['nbthread'] ? $a_global['nbthread'] : "1";
                        	fwrite ($fd, "\tnbproc\t\t\t{$numprocs}\n");
                        	if (haproxy_version() >= "1.8") {
                        		fwrite ($fd, "\tnbthread\t\t\t{$numthread}\n");
                        	}
                        
                        K 1 Reply Last reply Reply Quote 0
                        • T
                          thebear
                          last edited by

                          To bad its also dead at my end after the update.

                          haproxy: startup error output!: [NOTICE] (74851) : haproxy version is 2.7.6-4dadaaa[NOTICE] (74851) : path to executable is /usr/local/sbin/haproxy[ALERT] (74851) : config : parsing [/var/etc/haproxy/haproxy.cfg:8] : nbproc is not supported any more since HAProxy 2.5. Threads will automatically be used on multi-processor machines if available.[ALERT] (74851) : config : Error(s) found in configuration file : /var/etc/haproxy/haproxy.cfg[ALERT] (74851) : config : Fatal errors found in configuration.
                          

                          Workarround
                          For those that do not want to SSH, you can do it from the pfSense GUI by going to Diagnostics->Edit File, make the change manually, then go to Diagnostics->Command Prompt and run: haproxy -f /var/etc/haproxy/haproxy.cfg

                          @stephenw10 is the team aware of this bug? Do you want a redmine bug report?

                          M 1 Reply Last reply Reply Quote 0
                          • SjMS
                            SjM @kiddsupreme
                            last edited by SjM

                            @kiddsupreme look for this line in haproxy.inc
                            ==> fwrite ($fd, "\tnbproc\t\t\t{$numprocs}\n");
                            Wrap it in the if statement and do a resave in the WebGUI for haproxy.

                            1 Reply Last reply Reply Quote 0
                            • K
                              kiddsupreme @Cylosoft
                              last edited by

                              @Cylosoft I also could not get it to work (which was why I was asking about how it was pasted into the file). As you suggested, I removed that information and everything popped up. Is there any negatives about running things this way? Thanks again for the help!

                              C 1 Reply Last reply Reply Quote 0
                              • M
                                michmoor LAYER 8 Rebel Alliance @thebear
                                last edited by

                                @thebear A new build is coming. Give it a few hours.

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

                                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                                Routing: Juniper, Arista, Cisco
                                Switching: Juniper, Arista, Cisco
                                Wireless: Unifi, Aruba IAP
                                JNCIP,CCNP Enterprise

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  thebear @michmoor
                                  last edited by

                                  @michmoor great news, thanks for confirming there is already a bug report.

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    Cylosoft @kiddsupreme
                                    last edited by

                                    @kiddsupreme Most people are running the defaults for these settings anyway so I wouldn't worry too much about it. Netgate is pretty quick with the fixes on these so I'm sure an updated version is coming soon anyway.

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

                                      Looks like 0.63_1 is out and it fixes this.

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

                                        I can confirm the new package 0.63_1 fixes this issue. After updating the package, you may have to go HAProxy->Settings, click save so it writes a new config and then restart the service to clear the message saying changes were made, etc. in pfSense. Thank you devs for the quick fix!

                                        D 1 Reply Last reply Reply Quote 1
                                        • D
                                          Darkk @davidi
                                          last edited by Darkk

                                          @davidi said in haproxy broken after update to 2.8.0: nbproc is not supported any more...:

                                          I can confirm the new package 0.63_1 fixes this issue. After updating the package, you may have to go HAProxy->Settings, click save so it writes a new config and then restart the service to clear the message saying changes were made, etc. in pfSense. Thank you devs for the quick fix!

                                          Yep. I can confirm this as well. I've switched back to non-dev version and saved the changes. It's working fine now.

                                          R 1 Reply Last reply Reply Quote 0
                                          • R
                                            royjones @Darkk
                                            last edited by royjones

                                            @michmoor: Update to 0.63_1 went through without problems, error has been eliminated.

                                            Many thanks for the quick help!

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