Ad Widget

Collapse

HTTP ERROR 500 : After Database Migration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • medharrak
    Member
    • Jun 2018
    • 31

    #1

    HTTP ERROR 500 : After Database Migration

    I have a production server running Zabbix 5.0.20 Installed on Centos 8 , with MariaDB 10.3.
    because Centos 8 is now EOF , I'm planning to move to Oracle Linux, So I did a fresh install of Oracle Linux8 and Zabbix 6.0 LTS with MariaDB 10.6, everything is working fine , but after I did restore the Database taken from the production server (using mysqldump ), I'm no able to access Zabbix page , I get HTTP ERROR 500.

    /var/log/httpd/ssl_error_log ---> display
    [Sun Feb 27 11:39:26.653566 2022] [proxy_fcgi:error] [pid 4198:tid 139855375873792] [client 192.168.56.1:43020] AH01071: Got error 'PHP message: PHP Notice: Undefined offset: 0 in /usr/share/zabbix/include/classes/api/services/CSettings.php on line 123\nPHP message: PHP Fatal error: Uncaught TypeError: Return value of CSettings::getGlobal() must be of the type array, null returned in /usr/share/zabbix/include/classes/api/services/CSettings.php:123\nStack trace:\n#0 /usr/share/zabbix/include/classes/helpers/CSettingsHelper.php(104): CSettings->getGlobal(Array, false)\n#1 /usr/share/zabbix/include/classes/helpers/CSettingsHelper.php(127): CSettingsHelper::loadParams('session_key', true)\n#2 /usr/share/zabbix/include/classes/core/CEncryptedCookieSession.php(33): CSettingsHelper::getGlobal('session_key')\n#3 /usr/share/zabbix/include/classes/core/ZBase.php(464): CEncryptedCookieSession->extractSessionId()\n#4 /usr/share/zabbix/include/classes/core/ZBase.php(187): ZBase->authenticateUser()\n#5 /usr/share/zabbix/include/config.inc.php(25): ZBase->run('default')\n#6 /usr/share/zabbix/index.php(24): require_once('/usr/share/zabb...')\n#7 {main}\n thrown in /usr/share/zabbix/include/classes/api/services/CSettings.php on line 123\n'

    any idea ?
    Thank you
  • gcalenko
    Zabbix developer
    • Mar 2017
    • 27

    #2
    Can you please check config table and ensure that it is not empty?

    Comment

    • medharrak
      Member
      • Jun 2018
      • 31

      #3
      Originally posted by gcalenko
      Can you please check config table and ensure that it is not empty?
      Config table is not empty

      Comment

      • um3n
        Member
        • Aug 2021
        • 47

        #4
        You should migrate the db to the newer version first - i think.

        We also just updated our zabbix systems and it works like charm.

        Comment

        • gcalenko
          Zabbix developer
          • Mar 2017
          • 27

          #5
          Just a guess: incognito mode also lead to HTTP 500 error?
          Error you have, happen when configuration settings cannot be read from database.

          Comment

          • um3n
            Member
            • Aug 2021
            • 47

            #6
            I will wrap your log into a code blog - so its easier to read:

            /var/log/httpd/ssl_error_log ---> display
            Code:
            [Sun Feb 27 11:39:26.653566 2022] [proxy_fcgi:error] [pid 4198:tid 139855375873792] [client 192.168.56.1:43020] AH01071: Got error 'PHP message: PHP Notice: Undefined offset: 0 in /usr/share/zabbix/include/classes/api/services/CSettings.php on line 123\nPHP message: PHP Fatal error: Uncaught TypeError: Return value of CSettings::getGlobal() must be of the type array, null returned in /usr/share/zabbix/include/classes/api/services/CSettings.php:123\nStack trace:\n#0 /usr/share/zabbix/include/classes/helpers/CSettingsHelper.php(104): CSettings->getGlobal(Array, false)\n#1 /usr/share/zabbix/include/classes/helpers/CSettingsHelper.php(127): CSettingsHelper::loadParams('session_key', true)\n#2 /usr/share/zabbix/include/classes/core/CEncryptedCookieSession.php(33): CSettingsHelper::getGlobal('session_key')\n#3 /usr/share/zabbix/include/classes/core/ZBase.php(464): CEncryptedCookieSession->extractSessionId()\n#4 /usr/share/zabbix/include/classes/core/ZBase.php(187): ZBase->authenticateUser()\n#5 /usr/share/zabbix/include/config.inc.php(25): ZBase->run('default')\n#6 /usr/share/zabbix/index.php(24): require_once('/usr/share/zabb...')\n#7 {main}\n thrown in /usr/share/zabbix/include/classes/api/services/CSettings.php on line 123\n'
            Please check, whether the database is running, the access is working... maybe look into the zabbix logs as well.

            Comment

            Working...