Bug: MISP cannot access workers
Actual behavior
Expected behavior
Hello,
After updating to version 2.5, MISP is unable to access Redis and displays the following error:
Warning: MISP cannot access your /proc directory to check the status of the worker processes, which means that dead workers will not be detected by the diagnostic tool. If you would like to regain this functionality, make sure that the open_basedir directive is not set, or that /proc is included in it.
Warning: MISP cannot connect to the Supervisord API, check the following settings are correct: [`supervisor_host`, `supervisor_port`, `supervisor_user`, `supervisor_password`] and restart the service. For details check the MISP error logs.
. Interestingly, Redis is running on port 6379, and I am receiving a pong response, but MISP cannot connect to it. Additionally, the supervisor username and password have been entered correctly. I would appreciate your assistance with this issue.
Thank you!
Feel free to add the specific error message where indicated!
Steps to reproduce
Version
2.5
Operating System
Ubuntu
Operating System version
24.04.1
PHP version
8.3
Browser
No response
Browser version
No response
Relevant log output
Warning (2): Undefined array key "proc_accessible" [APP/View/Elements/healthElements/workers.ctp, line 3]
Code Context
include - APP/View/Elements/healthElements/workers.ctp, line 3
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::_renderElement() - APP/Lib/cakephp/lib/Cake/View/View.php, line 1224
View::element() - APP/Lib/cakephp/lib/Cake/View/View.php, line 418
include - APP/View/Servers/server_settings.ctp, line 13
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 473
Controller::render() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 973
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 200
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 99
Warning: MISP cannot access your /proc directory to check the status of the worker processes, which means that dead workers will not be detected by the diagnostic tool. If you would like to regain this functionality, make sure that the open_basedir directive is not set, or that /proc is included in it.
Warning (2): Undefined array key "supervisord_status" [APP/View/Elements/healthElements/workers.ctp, line 9]
Code Context
include - APP/View/Elements/healthElements/workers.ctp, line 9
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::_renderElement() - APP/Lib/cakephp/lib/Cake/View/View.php, line 1224
View::element() - APP/Lib/cakephp/lib/Cake/View/View.php, line 418
include - APP/View/Servers/server_settings.ctp, line 13
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 473
Controller::render() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 973
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 200
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 99
Warning: MISP cannot connect to the Supervisord API, check the following settings are correct: [`supervisor_host`, `supervisor_port`, `supervisor_user`, `supervisor_password`] and restart the service. For details check the MISP error logs.
Warning (2): Undefined array key "controls" [APP/View/Elements/healthElements/workers.ctp, line 15]
Code Context
include - APP/View/Elements/healthElements/workers.ctp, line 15
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::_renderElement() - APP/Lib/cakephp/lib/Cake/View/View.php, line 1224
View::element() - APP/Lib/cakephp/lib/Cake/View/View.php, line 418
include - APP/View/Servers/server_settings.ctp, line 13
View::_evaluate() - APP/Lib/cakephp/lib/Cake/View/View.php, line 971
View::_render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 933
View::render() - APP/Lib/cakephp/lib/Cake/View/View.php, line 473
Controller::render() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 973
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 200
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 99
Extra attachments
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hey there, the issue appears to be that MISP cannot connect to supervisord. Some troubleshooting steps:
- Check the config variables for SimpleBackgroundJobs and ensure that the redis and supervisor variables are set correctly.
- Ensure that redis and supervisord are configured accordingly to your variables, especially username and password.
- Check redis and supervisord logs for errors.
Hey there, the issue appears to be that MISP cannot connect to supervisord. Some troubleshooting steps:
- Check the config variables for SimpleBackgroundJobs and ensure that the redis and supervisor variables are set correctly.
- Ensure that redis and supervisord are configured accordingly to your variables, especially username and password.
- Check redis and supervisord logs for errors.
Hello there, All these tasks have been completed, and there are no issues in the logs. I even manually tested the status of Redis and Supervisor using curl, and they are working. There was nothing in the announced logs. The only log with an error is the MISP error log.
Error: [Exception] Class Redis doesn't exists. Please install redis extension for PHP. Request URL: /servers/serverSettings/diagnostics Stack Trace: #0 /var/www/MISP/app/Lib/Tools/BackgroundJobsTool.php(126): BackgroundJobsTool->createRedisConnection() #1 /var/www/MISP/app/Model/AppModel.php(3307): BackgroundJobsTool->__construct() #2 /var/www/MISP/app/Model/Server.php(3856): AppModel->getBackgroundJobsTool() #3 /var/www/MISP/app/Controller/ServersController.php(1194): Server->backgroundJobsDiagnostics() #4 [internal function]: ServersController->serverSettings() #5 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(504): ReflectionMethod->invokeArgs() #6 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction() #7 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke() #8 /var/www/MISP/app/webroot/index.php(99): Dispatcher->dispatch() #9 {main}
Looks like the redis extension for PHP is missing, this may be caused by multiple things. Do you see redis when running "php -m"? If not, try running "phpenmod redis"
Looks like the redis extension for PHP is missing, this may be caused by multiple things. Do you see redis when running "php -m"? If not, try running "phpenmod redis"
Yes, I can see Redis in "php -m".
Do you have both php7.4 and php8.x installed now? Which php binary is php -m using? I assume that it might be using 7.4 still?
@clunk0y How you fixed it? I have same problem and diagnostics page shows internal error message.
@clunk0y How you fixed it? I have same problem and diagnostics page shows internal error message.
Check if the PHP version running on MISP is truly 8.3 by
<?php
phpinfo();
?>