Ad Widget

Collapse

500 Internal Server Error. Zabbix 6.4.3

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Del.Mar
    Junior Member
    • May 2022
    • 9

    #1

    500 Internal Server Error. Zabbix 6.4.3

    Hi mates!
    I have fresh installation of zabbix 6.4.3. Try to open setup.php and see blank screen. What have I got?
    Code:
    $ uname -a
    FreeBSD tank 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64​
    PHP version and php modules
    Code:
    i@tank:~ $ php -v
    PHP 8.2.6 (cli) (built: May 31 2023 23:56:53) (ZTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.6, Copyright (c) Zend Technologies
    i@tank:~ $ php -m
    [PHP Modules]
    bcmath
    bz2
    Core
    ctype
    date
    dom
    filter
    gd
    gettext
    hash
    iconv
    json
    ldap
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcre
    random
    Reflection
    session
    SimpleXML
    sockets
    SPL
    standard
    xml
    xmlreader
    xmlwriter
    zip
    zlib
    [Zend Modules]
    I use nginx+php-fpm thgrough unix socket. Phpinfo.php works fine.
    Nginx debug error log here
    Code:
    2023/06/01 02:32:45 [error] 1473#100391: *22 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class "CHtmlEntity" not found in /usr/local/www/zabbix64/include/html.inc.php:146
    Stack trace:
    #0 /usr/local/www/zabbix64/include/classes/helpers/CBrandHelper.php(121): COPYR()
    #1 /usr/local/www/zabbix64/include/html.inc.php(834): CBrandHelper::getFooterContent()
    #2 /usr/local/www/zabbix64/setup.php(194): makePageFooter()
    #3 {main}
      thrown in /usr/local/www/zabbix64/include/html.inc.php on line 146" while reading response header from upstream, client: 192.168.0.29, server: tank.local, request: "GET /zabbix/setup.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "tank.local"
    2023/06/01 02:32:45 [error] 1473#100391: *22 FastCGI sent in stderr: "; PHP message: PHP Warning:  Undefined array key "file" in /usr/local/www/zabbix64/include/classes/debug/CProfiler.php on line 381; PHP message: PHP Warning:  Undefined array key "line" in /usr/local/www/zabbix64/include/classes/debug/CProfiler.php on line 381; PHP message: PHP Warning:  Trying to access array offset on value of type null in /usr/local/www/zabbix64/include/classes/core/CCookieSession.php on line 194; PHP message: PHP Warning:  Undefined array key "file" in /usr/local/www/zabbix64/include/classes/debug/CProfiler.php on line 381; PHP message: PHP Warning:  Undefined array key "line" in /usr/local/www/zabbix64/include/classes/debug/CProfiler.php on line 381; PHP message: PHP Warning:  Cannot modify header information - headers already sent in /usr/local/www/zabbix64/include/classes/helpers/CCookieHelper.php on line 59; PHP message: PHP Warning:  PHP Request Shutdown: Failed to write session data using user defined save handler. (session.save_path: /tmp, handler: write) in Unknown on line 0" while reading upstream, client: 192.168.0.29, server: tank.local, request: "GET /zabbix/setup.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "tank.local"
  • Answer selected by Del.Mar at 01-06-2023, 15:36.
    Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    The reason is that one file with a description of the class CHtmlEntity is missing .
    Take the ui/include/classes/htmlCHtmlEntity.php file from the source files and put it on your server the same path .

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #2
      How did you install zabbix64-frontend and zabbix64-server ? From ports, pkg or sources?

      Pls show "pkg version -v | grep zabb"

      Comment

      • Del.Mar
        Junior Member
        • May 2022
        • 9

        #3
        Originally posted by Hamardaban
        How did you install zabbix64-frontend and zabbix64-server ? From ports, pkg or sources?

        Pls show "pkg version -v | grep zabb"
        I've installed from ports.
        Code:
        i@tank:~ $ pkg info | grep zabb
        zabbix64-agent-6.4.3           Enterprise-class open source distributed monitoring (agent)
        zabbix64-frontend-php82-6.4.3  Enterprise-class open source distributed monitoring (frontend-php82)
        zabbix64-server-6.4.3          Enterprise-class open source distributed monitoring (server)

        Comment

        • Hamardaban
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2019
          • 2713

          #4
          I tried frontend 6.4.3 - it doesn't work.
          There's a lot changed in the code and apparently there are errors.
          Install the frontend from version 6.4.2 (download the sources and just copy the corresponding files.)

          Comment

          • KvLeshik
            Junior Member
            • Mar 2016
            • 4

            #5
            Same error but after upgrade from 6.0.17 -> 6.0.18


            Code:
            FreeBSD zabbix0.x.y 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64
            Code:
            2023/06/01 13:30:50 [error] 13794#223277: *3 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "CHtmlEntity" not found in /usr/local/www/zabbix6/include/html.inc.php:142
            Stack trace:
            #0 /usr/local/www/zabbix6/app/views/monitoring.widget.problems.view.php(61): BULLET()
            [NODE="1"]Home[/NODE] /usr/local/www/zabbix6/include/classes/mvc/CView.php(136): include('/usr/local/www/...')
            [NODE="2"]Forum[/NODE] /usr/local/www/zabbix6/include/classes/core/ZBase.php(619): CView->getOutput()
            #3 /usr/local/www/zabbix6/include/classes/core/ZBase.php(545): ZBase->processResponseFinal()
            #4 /usr/local/www/zabbix6/include/classes/core/ZBase.php(222): ZBase->processRequest()
            #5 /usr/local/www/zabbix6/include/config.inc.php(25): ZBase->run()
            [NODE="6"]Special[/NODE] /usr/local/www/zabbix6/zabbix.php(22): require_once('/usr/local/www/...')
            #7 {main}
            thrown in /usr/local/www/zabbix6/include/html.inc.php on line 142" while reading response header from upstream, client: 1.2.3.4, server: zabbix.x.y, request: "POST /zabbix.php?sid=f1d45e3d975be58f&action=widget.prob lems.view HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "zabbix.x.y", referrer: "https://zabbix.x.y/zabbix.php?action=dashboard.view"​
            Code:
            PHP 8.1.19 (cli) (built: May 17 2023 17:38:47) (NTS)
            Copyright (c) The PHP Group
            Zend Engine v4.1.19, Copyright (c) Zend Technologies​

            If we now return the frontend from 6.0.17, the error changes to:

            Code:
            2023/06/01 12:49:18 [error] 13794#223277: *3 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "CHtml" not found in /usr/local/www/zabbix6/include/classes/html/CTag.php:172
            Stack trace:
            #0 /usr/local/www/zabbix6/include/classes/html/CTag.php(253): CTag->setAttribute()
            [NODE="1"]Home[/NODE] /usr/local/www/zabbix6/include/triggers.inc.php(2018): CTag->setMenuPopup()
            [NODE="2"]Forum[/NODE] /usr/local/www/zabbix6/app/views/monitoring.widget.problems.view.php(75): makeTriggersHostsList()
            #3 /usr/local/www/zabbix6/include/classes/mvc/CView.php(136): include('/usr/local/www/...')
            #4 /usr/local/www/zabbix6/include/classes/core/ZBase.php(619): CView->getOutput()
            #5 /usr/local/www/zabbix6/include/classes/core/ZBase.php(545): ZBase->processResponseFinal()
            [NODE="6"]Special[/NODE] /usr/local/www/zabbix6/include/classes/core/ZBase.php(222): ZBase->processRequest()
            #7 /usr/local/www/zabbix6/include/config.inc.php(25): ZBase->run()
            [NODE="8"]Private Messages[/NODE] /usr/local/www/zabbix6/zabbix.php(22): require_once('/usr/local/www/...')
            [NODE="9"]Albums[/NODE] {main}
            thrown in /usr/local/www/zabbix6/include/classes/html/CTag.php on line 172" while reading response header from upstream, client: 1.2.3.4, server: zabbix.x.y, request: "POST /zabbix.php?sid=f1d45e3d975be58f&action=widget.prob lems.view HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "zabbix.x.y", referrer: "https://zabbix.x.y/zabbix.php?action=dashboard.view"​

            Comment

            • Hamardaban
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2019
              • 2713

              #6
              The reason is that one file with a description of the class CHtmlEntity is missing .
              Take the ui/include/classes/htmlCHtmlEntity.php file from the source files and put it on your server the same path .

              Comment

              • KvLeshik
                Junior Member
                • Mar 2016
                • 4

                #7
                Originally posted by Hamardaban
                The reason is that one file with a description of the class CHtmlEntity is missing .
                Take the ui/include/classes/htmlCHtmlEntity.php file from the source files and put it on your server the same path .
                Thanks a lot, it helped. Looks like the FreeBSD port maintainer forgot to add this file to the plist

                Comment

                • Del.Mar
                  Junior Member
                  • May 2022
                  • 9

                  #8
                  Hi mates!
                  Thanks for answers and help. I've uploaded all files from source 6.4.3 package to zabbix frontend directory with rewrite. Install page open without errors.
                  Somebody posted bug here. Hope that port will be updated soon.

                  Comment

                  Working...