Предыстория - был установлен сервер версии 6.0.1 (БД MariaDB), решил обновиться до 6.2 - неудачно, БД не поднялась, сервер не запустился, откатил до версии 6.0.6, ругался в логах на dbversion, обновил update dbversion set mandatory на требуемое значение, сервер заработал.
Спустя несколько дней после обновления страницы web интерфейса, выдало ошибку HTTP ERROR 500.
Лог nginx
Пробовал переустанавливать сервер, но после завершения настройки web интерфейса с подключение имеющейся БД снова выдает HTTP ERROR 500
Лог nginx
/usr/share/zabbix/include/classes/api/services/CAuthentication.php (75 строка - return $db_auth[0]; )
Может кто сталкивался с подобным?
Спустя несколько дней после обновления страницы web интерфейса, выдало ошибку HTTP ERROR 500.
Лог nginx
Code:
2022/08/05 11:02:23 [error] 90160#0: *33 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 0 in /usr/share/zabbix/include/classes/api/services/CAuthentication.php on line 75PHP message: PHP Fatal error: Uncaught TypeError: Return value of CAuthentication::get() must be of the type array, null returned in /usr/share/zabbix/include/classes/api/services/CAuthentication.php:75 Stack trace: #0 /usr/share/zabbix/include/classes/helpers/CAuthenticationHelper.php(72): CAuthentication->get() #1 /usr/share/zabbix/include/classes/helpers/CConfigGeneralHelper.php(47): CAuthenticationHelper::loadParams() #2 /usr/share/zabbix/include/classes/api/services/CUser.php(1498): CConfigGeneralHelper::get() #3 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(121): CUser->login() #4 /usr/share/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod() #5 /usr/share/zabbix/include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod() #6 /usr/share/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod() #7 /usr/share/zabbix/include/classes/api/wrappers/CApiWrapper.php(82): CFro" while reading response header from upstream, client: 192.168.41.55, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080"
Лог nginx
Code:
2022/08/05 10:59:53 [error] 90160#0: *1 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "GET /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080" 2022/08/05 11:00:11 [error] 90160#0: *9 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "POST /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080", referrer: "http://192.168.44.37:8080/setup.php" 2022/08/05 11:00:49 [error] 90160#0: *15 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "POST /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080", referrer: "http://192.168.44.37:8080/setup.php" 2022/08/05 11:01:24 [error] 90160#0: *19 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "POST /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080", referrer: "http://192.168.44.37:8080/setup.php" 2022/08/05 11:01:43 [error] 90160#0: *25 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "POST /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080", referrer: "http://192.168.44.37:8080/setup.php" 2022/08/05 11:01:47 [error] 90160#0: *25 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/zabbix/include/classes/core/CCookieSession.php on line 194" while reading response header from upstream, client: 192.168.41.55, server: , request: "POST /setup.php HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.44.37:8080", referrer: "http://192.168.44.37:8080/setup.php"
Code:
public function get(array $options): array {
$api_input_rules = ['type' => API_OBJECT, 'fields' => [
'output' => ['type' => API_OUTPUT, 'in' => implode(',', $this->output_fields), 'default' => API_OUTPUT_EXTEND]
]];
if (!CApiInputValidator::validate($api_input_rules, $options, '/', $error)) {
self::exception(ZBX_API_ERROR_PARAMETERS, $error);
}
if ($options['output'] === API_OUTPUT_EXTEND) {
$options['output'] = $this->output_fields;
}
$db_auth = [];
$result = DBselect($this->createSelectQuery($this->tableName(), $options));
while ($row = DBfetch($result)) {
$db_auth[] = $row;
}
$db_auth = $this->unsetExtraFields($db_auth, ['configid'], []);
return $db_auth[0];
}
Comment