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

    HAProxy GUI error after upgrade to pfSense+ 23.01

    pfSense Packages
    5
    23
    4.5k
    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.
    • D
      da_Beast
      last edited by

      After upgrading from CE to Plus 22.01 then 23.01 I found that my HAProxy widget has errors. Anyone else having this issue? To recover I have to kill the HAProxy via CLI and then remove the widget from the dashboard.

      The errors are:
      Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126 Stack trace: #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('') #1 /usr/local/www/index.php(430): include('/usr/local/www/...') #2 {main} thrown in /etc/inc/util.inc on line 2126 PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 2126, Message: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126 Stack trace: #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('') #1 /usr/local/www/index.php(430): include('/usr/local/www/...') #2 {main} thrown

      Shows up as:
      PHP ERROR: Type: 1, File: /etc/inc/util.inc, Line: 2126, Message: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
      Stack trace:
      #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('<NEVER>')
      #1 /usr/local/www/index.php(430): include('/usr/local/www/...')
      #2 {main}
      thrown @ 2023-02-23 14:39:45

      and creates a crash report:
      Crash report begins. Anonymous machine information:

      amd64
      14.0-CURRENT
      FreeBSD 14.0-CURRENT #0 plus-RELENG_23_01-n256037-6e914874a5e: Fri Feb 10 20:30:29 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/obj/amd64/VDZvZksF/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/sources/FreeBS

      Crash report details:

      PHP Errors:
      [23-Feb-2023 14:39:45 America/Los_Angeles] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
      Stack trace:
      #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('<NEVER>')
      #1 /usr/local/www/index.php(430): include('/usr/local/www/...')
      #2 {main}
      thrown in /etc/inc/util.inc on line 2126
      [23-Feb-2023 14:41:04 America/Los_Angeles] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
      Stack trace:
      #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('<NEVER>')
      #1 {main}

      V 1 Reply Last reply Reply Quote 1
      • V
        vincef @da_Beast
        last edited by

        @da_beast

        Same issue here, was there a solution, tried to reinstall the package no joy (slightly different log entry)

        PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
        Stack trace:
        #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('<NEVER>')
        #1 {main}
        thrown in /etc/inc/util.inc on line 2126

        1 Reply Last reply Reply Quote 1
        • G
          guyvdwerf
          last edited by

          @da_Beast

          Same here. Came from a new ZFS-based install of 2.6.0 over my existing non-ZFS-based 2.6.0. Upgraded to 22.01, then 22.05, then finally 23.01. Had no noticable issues between them, but hit the HAProxy issue at the end.

          I found pfSense issue 14024 so the issue is known already. Interested to know if a patch will be made available as this is almost a show-stopper. The current configuration functions correctly, but changing that configuration is impossible.

          I'm interested to know if you (or anyone else) has a workaround for it, as the GUI Dashboard and the menu is essentially useless currently.

          I realise I could use the menu option URLs directly but I don't have them recorded anywhere, so I'm reliant on the menu actually working. Any ideas? Cheers.

          G 1 Reply Last reply Reply Quote 0
          • G
            guyvdwerf @guyvdwerf
            last edited by

            For those with similar problems, I have a workaround - downgrade from "haproxy_devel" to "haproxy".

            Steps that may help:

            • As the Dashboard URL crashes and breaks the menu, go directly to https://<host>/pkg_mgr_installed.php
            • Uninstall "haproxy_devel". The configuration is kept.
            • Install "haproxy".

            My Dashboard now works again, so I hope it helps you too.

            1 Reply Last reply Reply Quote 0
            • V
              vincef
              last edited by

              I have not seen the issue after the following

              Removing the HA Proxy dashboard
              Reinstalling the package
              Adding HA Proxy back to the dashboard

              -Vince

              G 1 Reply Last reply Reply Quote 0
              • G
                guyvdwerf @vincef
                last edited by

                @vincef
                Thanks for the info. I upgraded back to "haproxy_devel" and it works again.

                G 1 Reply Last reply Reply Quote 0
                • G
                  guyvdwerf @guyvdwerf
                  last edited by

                  @vincef

                  Spoke too soon. I let the session time out, then logged back in.
                  The problem has returned. The Dashboard errors at the HAProxy widget which stops the page load which prevents the menu functioning.

                  V 1 Reply Last reply Reply Quote 0
                  • V
                    vincef @guyvdwerf
                    last edited by

                    @guyvdwerf

                    Here is the package I am using, seems to be working good for me

                    haproxy net 0.61_9 The Reliable, High Performance TCP/HTTP(S) Load Balancer.
                    This package implements the TCP, HTTP and HTTPS balancing features from haproxy.
                    Supports ACLs for smart backend switching.

                    Package Dependencies:
                    haproxy22-2.2.25

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      da_Beast @vincef
                      last edited by

                      @vincef I have issues with that version - using haproxy-devel: 0.62_12 has resolved it for me.

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

                        I am using two versions of pfSense, 2.6.0-RELEASE with haproxy 0.61_7 and 23.01-RELEASE with 0.61_9. The 2.6.0 version is working perfectly, but the 23.01 version is presenting a php error as described by others above. Has anyone had any success regarding the fix for 23.01 with 0.61_9?

                        G 1 Reply Last reply Reply Quote 0
                        • G
                          guyvdwerf @gustavohop
                          last edited by

                          @gustavohop
                          Unfortunately I can only confirm that I have the same problem as you.
                          Using pfSense+ 23.01 and any version of haproxy results in dashboard corruption (incomplete widgets and menus no longer work) and a logged error:

                          PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
                          

                          Switching between prod and dev haproxy packages does not resolve the issue.

                          G 1 Reply Last reply Reply Quote 2
                          • M
                            mervincm
                            last edited by

                            adding my name to the list. (psf+ 2301 haproxy (non dev) package
                            removing it from the dashboard, reinstalling the package, add to dashboard -- did nothing

                            I still get errors / crash reporter. over and over and over

                            Crash report begins. Anonymous machine information:

                            amd64
                            14.0-CURRENT
                            FreeBSD 14.0-CURRENT #0 plus-RELENG_23_01-n256037-6e914874a5e: Fri Feb 10 20:30:29 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/obj/amd64/VDZvZksF/var/jenkins/workspace/pfSense-Plus-snapshots-23_01-main/sources/FreeBS

                            Crash report details:

                            PHP Errors:
                            PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
                            Stack trace:
                            #0 /usr/local/www/widgets/widgets/haproxy.widget.php(218): format_bytes('<NEVER>')
                            #1 {main}
                            thrown in /etc/inc/util.inc on line 2126

                            V 1 Reply Last reply Reply Quote 0
                            • V
                              vincef @mervincm
                              last edited by

                              @mervincm try using haproxy-devel: 0.62_12

                              M 2 Replies Last reply Reply Quote 1
                              • M
                                mervincm @vincef
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • M
                                  mervincm @vincef
                                  last edited by

                                  @vincef does it update cleanly over the prod version?

                                  V 1 Reply Last reply Reply Quote 0
                                  • V
                                    vincef @mervincm
                                    last edited by

                                    @mervincm said in HAProxy GUI error after upgrade to pfSense+ 23.01:

                                    @vincef does it update cleanly over the prod version?

                                    I want to say I was biting my nails as I had a web site that I did not want to go down. I don't recall if I uninstalled then installed the dev package but I think I uninstalled and reinstalled. Just take a backup first, all ese fails revert. That was my plan when I did it.

                                    Also save the config as you can always reinstall the older package.

                                    1 Reply Last reply Reply Quote 1
                                    • G
                                      guyvdwerf @guyvdwerf
                                      last edited by

                                      @guyvdwerf said in HAProxy GUI error after upgrade to pfSense+ 23.01:

                                      With reference to my last post (below), I'd like to summerise our findings from the topic so far, because entries are starting to repeat themselves.
                                      And please excuse the length...

                                      Issue
                                      Entries show that there is a dashboard problem in all available versions of HAProxy in PFSense, specifically:

                                      • pfSense+ 23.01
                                      • package: haproxy-devel 0.62_12
                                      • package: haproxy 0.61_9

                                      i.e. all package versions of HAProxy available with this version of PFSense.

                                      Problem
                                      The problem is seen as:

                                      • a PHP error on the dashboard and in the log
                                      • a non-functioning menu in the dashboard

                                      I found https://redmine.pfsense.org/issues/14024 which logs the problem, but is currently unresolved (4 May 2023 @ 10:30 am CET).

                                      Workarounds

                                      1. A workaround exists to use PFsense regardless of the HAProxy dashboard issue by navigating to any other PFSense menu URL directly.
                                        This includes navigating to HAProxy itself using https://<host>/haproxy/haproxy_global.php.
                                        Once away from the dashboard URL, the PHP error is no longer seen or logged, and the menu works again.
                                        This workaround does NOT fix the dashboard problem if one navigates back to it e.g. https://<host>/index.php.
                                      2. https://redmine.pfsense.org/issues/14024 includes a code change that apparently fixes the problem, but is not offically comfirmed or released as a patch or merged into a new release. I have not tried it, but your mileage may vary.

                                      A workaround for HAProxy functionality is not required as that is not affected.

                                      Notes
                                      Upgrading/downgrading between HAProxy package versions is easily achieved by deleting the existing package and installing the other one using https://<host>/pkg_mgr_installed.php.

                                      Reconfiguring HAProxy is not required following an updgrade/downgrade because both versions as HAProxy can leave the configuration when uninstalled.

                                      To end on a ray of hope, @da_Beast created this topic, but resolved their issue by installing haproxy-devel 0.62_12. I cannot reproduce this.

                                      Hope this helps someone.

                                      @gustavohop
                                      Unfortunately I can only confirm that I have the same problem as you.
                                      Using pfSense+ 23.01 and any version of haproxy results in dashboard corruption (incomplete widgets and menus no longer work) and a logged error:

                                      PHP Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /etc/inc/util.inc:2126
                                      

                                      Switching between prod and dev haproxy packages does not resolve the issue.

                                      M 1 Reply Last reply Reply Quote 1
                                      • M
                                        mervincm @guyvdwerf
                                        last edited by

                                        @guyvdwerf
                                        great summary!

                                        BTW, I just did a backup, and installed haproxy-devel 0.62_12 on top of the regular package, and so far so good. I used to get a crash-detected bar to pop up simply by clicking on the pfsense + logo in the upper left corner. Now, I can poke around all I want and it seems fine.

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

                                          Hello everyone,
                                          When I change the package to haproxy-devel 0.62_12, the service doesn't start even after changing the "Maximum connections". I have tried using an excessively high value for access, but the error persists. I have also restarted and reinstalled the package, but it still doesn't work.

                                          Below is the error message:
                                          [ALERT] (21437) : [/usr/local/sbin/haproxy.main()] FD limit (11718) too low for maxconn=10000/maxsock=20026. Please raise 'ulimit-n' to 20026 or more to avoid any trouble.
                                          [ALERT] (36279) : [/usr/local/sbin/haproxy.main()] FD limit (11718) too low for maxconn=100000/maxsock=200026. Please raise 'ulimit-n' to 200026 or more to avoid any trouble.

                                          I apologize to everyone as this problem is a bit off-topic for the forum, but if anyone has solved it before, could you please help me?

                                          Thank you in advance.

                                          G 1 Reply Last reply Reply Quote 0
                                          • G
                                            guyvdwerf @mervincm
                                            last edited by

                                            @mervincm sounds unusual but interesting.
                                            Regardless of backup for safety's sake, do I understand you have haproxy 0.61_9 installed, then installed haproxy-devel 0.62_12 as well... so both packages are now installed?

                                            If so, does anyone else have this configuration?

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