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

    Zabbix agent broken on 2.4.4? PHP error

    Scheduled Pinned Locked Moved pfSense Packages
    32 Posts 5 Posters 3.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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      Should all be fixed now in 1.0.4

      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
      • M
        mdomnis
        last edited by

        Confirmed that 1.0.4 is able to start again. Thanks jimp.

        1 Reply Last reply Reply Quote 0
        • J
          jarlel
          last edited by

          Hi, I still se the same issue (1.0.4):

          Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
          Stack trace:
          #0 /etc/rc.packages(74): install_package_xml('zabbix-agent32')
          #1 {main}
          thrown in /etc/inc/pkg-utils.inc on line 790
          PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 790, Message: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
          Stack trace:
          #0 /etc/rc.packages(74): install_package_xml('zabbix-agent32')
          #1 {main}
          thrownpkg-static: POST-INSTALL script failed

          Cleaning up cache... done.

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

            Do you have any other packages installed on that box?
            Was something done to the configuration on that firewall to remove packages at any point?

            Try going to Diag > Command and in the PHP exec box, run this:

            $config['installedpackages'] = array();
            write_config('Add installedpackages container');
            

            And then try the install again.

            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!

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

              Or try the attached patch

              0_1540472879369_pkginit.diff

              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
              • A
                ashes00
                last edited by

                I'm seeing similar issues with zabbix-agent
                Had zabbix-agent 34 installed on 2.4.3-RELEASE-p1
                Disabled zabbix-agent from Menu Service/Zabbix....
                Uninstalled zabbix-agent 34
                Installed zabbix-agent 4, and got the following error.

                Executing custom_php_install_command()...PHP ERROR: Type: 1, File: /usr/local/pkg/zabbix-agent.inc, Line: 121, Message: Call to undefined function init_config_arr()pkg-static: POST-INSTALL script failed

                Zabbix is no longer in the Services Menu. Could this be related to 2.4.3-RELEASE-p1? I can't schedule that PF upgrade until 11/12/18.

                Ash

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

                  That's because you installed a 2.4.4 package on 2.4.3-p1. You need to upgrade to 2.4.4 first. Start a new thread to discuss that, it isn't related to this problem.

                  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!

                  F A 2 Replies Last reply Reply Quote 0
                  • F
                    faust @jimp
                    last edited by

                    @jimp said in Zabbix agent broken on 2.4.4? PHP error:

                    That's because you installed a 2.4.4 package on 2.4.3-p1. You need to upgrade to 2.4.4 first. Start a new thread to discuss that, it isn't related to this problem.

                    That is strange, I thought, this was no more possible (https://forum.netgate.com/topic/136355/shared-object-libdl-so-1-not-found-required-by-openvpn/28).

                    BTW, I can not find the diff or the commit between 1.0.2/1.0.3/1.0.4 version, I have just found this https://github.com/pfsense/FreeBSD-ports/commits/devel but is there any other repo to see what was done?

                    Thanks.

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

                      @faust said in Zabbix agent broken on 2.4.4? PHP error:

                      That is strange, I thought, this was no more possible (https://forum.netgate.com/topic/136355/shared-object-libdl-so-1-not-found-required-by-openvpn/28).

                      Some people still manage to do it somehow. We've done all we can on the server side, though. Firewalls should be picking up the new pfSense-upgrade change when it does an update check. That's still not related to this topic, though, so it belongs in another thread.

                      BTW, I can not find the diff or the commit between 1.0.2/1.0.3/1.0.4 version, I have just found this https://github.com/pfsense/FreeBSD-ports/commits/devel but is there any other repo to see what was done?

                      https://github.com/pfsense/FreeBSD-ports/tree/devel/net-mgmt/pfSense-pkg-zabbix-agent

                      But your original problem is unlikely related to just this package. See my posts above, https://forum.netgate.com/post/799954 and then a patch for you to try at https://forum.netgate.com/post/799957

                      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
                      • A
                        ashes00 @jimp
                        last edited by

                        @jimp I reinstalled the zabbix-agent 34, and still got the same problem. I guess all zabbix-agents were updated to 2.4.4! I guess I'll just wait until I update to 2.4.4

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          faust @ashes00
                          last edited by

                          @ashes00 said in Zabbix agent broken on 2.4.4? PHP error:

                          @jimp I reinstalled the zabbix-agent 34, and still got the same problem. I guess all zabbix-agents were updated to 2.4.4! I guess I'll just wait until I update to 2.4.4

                          @ashes00 See my precedent post, if you can get the old version of the pkg, you could reinstall it by CLI.

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

                            OK, I was able to reproduce your original issue on a fresh 2.4.4 VM with some config editing. It had nothing to do with zabbix, but that was the first package you tried to install.

                            The patch I posted a few replies up was the fix.

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

                            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
                            • J
                              jarlel @jimp
                              last edited by

                              @jimp said in Zabbix agent broken on 2.4.4? PHP error:

                              $config['installedpackages'] = array();
                              write_config('Add installedpackages container');

                              No other packages installed. Nothing has been done to remove packages to my knowledge.

                              I tried to run the command, seemed to execute ok.
                              Then tried installing Zabbix 3.2, but with an issue:

                              Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
                              Stack trace:
                              #0 /etc/rc.packages(74): install_package_xml('zabbix-agent32')
                              #1 {main}
                              thrown in /etc/inc/pkg-utils.inc on line 790
                              PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 790, Message: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
                              Stack trace:
                              #0 /etc/rc.packages(74): install_package_xml('zabbix-agent32')
                              #1 {main}
                              thrownpkg-static: POST-INSTALL script failed

                              Cleaning up cache... done.

                              Might be an idea to try the patch instead?
                              How should I install the patch?

                              Thanks.

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

                                Install the System Patches package and make a new entry for b77f0bf1311b617793dc40ea779512eb24805727 and then fetch/apply.

                                After that you should be able to install packages.

                                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
                                • J
                                  jarlel
                                  last edited by

                                  Thanks, but kind of biting my own tail here:

                                  Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
                                  Stack trace:
                                  #0 /etc/rc.packages(74): install_package_xml('System_Patches')
                                  #1 {main}
                                  thrown in /etc/inc/pkg-utils.inc on line 790
                                  PHP ERROR: Type: 1, File: /etc/inc/pkg-utils.inc, Line: 790, Message: Uncaught Error: Cannot use string offset as an array in /etc/inc/pkg-utils.inc:790
                                  Stack trace:
                                  #0 /etc/rc.packages(74): install_package_xml('System_Patches')
                                  #1 {main}
                                  thrownpkg-static: POST-INSTALL script failed

                                  Cleaning up cache... done.

                                  Any alternatives to get the patch installed?

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

                                    Ah, yeah, catch-22 there. Duh. Clearly my coffee hasn't kicked in yet.

                                    Try this from an ssh shell or the Diagnostics > Command page in the shell exec box:

                                    curl https://github.com/pfsense/pfsense/commit/b77f0bf1311b617793dc40ea779512eb24805727.diff | patch --directory=/ -p2 --ignore-whitespace
                                    

                                    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
                                    • J
                                      jarlel
                                      last edited by

                                      @jimp said in Zabbix agent broken on 2.4.4? PHP error:

                                      curl https://github.com/pfsense/pfsense/commit/b77f0bf1311b617793dc40ea779512eb24805727.diff | patch --directory=/ -p2 --ignore-whitespace

                                      Yes, that worked :-) Zabbix 3.2 installed! Thanks!

                                      Will this also work on 2.4.3?

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

                                        It's not necessary on 2.4.3, the bug that patch is fixing is only on 2.4.4.

                                        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
                                        • J
                                          jarlel
                                          last edited by

                                          Hm, ok. I have an issue that is related to PHP major versions - I am not allowed to install Zabbix on 2.4.3 as it raises some kind of "PHP Major version" issue. Says I need to upgrade first?

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

                                            Yes, that's not related to this. As the message says, you need to upgrade to 2.4.4 before you can install or upgrade packages.

                                            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!

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