Misp: Erroneous worker started with a user other than the apache user status

Created on 3 Jun 2016  Â·  4Comments  Â·  Source: MISP/MISP

Work environment

| Questions | Answers |
| --- | --- |
| Type of issue | Bug |
| OS version (server) | Ubuntu 14.04 |
| OS version (client) | OS X 10.10.5 |
| PHP version | 5.5.9 |
| MISP version / git hash | 2.4.47 |
| Browser | Firefox 46.0.1 |

Expected behavior

Workers started from MISP server settings UI ("Restart all workers") should report a healthy queue status at _/servers/serverSettings/workers_.

Actual behavior

Workers start from UI and show healthy (report worker PID, web server user, and that "The worker appears to be healthy"). Healthy workers show Worker PIDs 1, 3, 5 and 7. However, queue status shows that _"Queue status: Issues prevent jobs from being processed. Please resolve them below"_ and lists Worker PIDs 0, 2, 4 and 6 in Worker Process state "Unknown" with the message _"The worker was started with a user other than the apache user. MISP cannot check whether the worker is alive or not."_

Steps to reproduce the behavior

  1. Stop workers: /var/www/MISP/app/Console/cake CakeResque.CakeResque stop --all
  2. Access Server Settings web UI >> Workers
  3. Click Restart all workers
  4. No immediate change indicated in web UI
  5. Change to different tab, and then back again to Workers tab
  6. See that cache, default, email and scheduler worker types show healthy status, and that section at bottom of page shows workers with described problem status.

    Logs, screenshots, configuration dump, ...

workers_ui

Unsure if related but following logs are written to /var/www/MISP/app/tmp/logs/debug.log when clicking around among Server Settings tabs:

2016-06-03 13:15:23 Notice: Notice (8): unserialize(): Error at offset 0 of 5 bytes in [/var/www/MISP/app/Vendor/kamisama/resque-status/src/ResqueStatus/ResqueStatus.php, line 127]
Trace:
unserialize - [internal], line ??
ResqueStatus\ResqueStatus::getWorkers() - APP/Vendor/kamisama/resque-status/src/ResqueStatus/ResqueStatus.php, line 127
Server::workerDiagnostics() - APP/Model/Server.php, line 2481
ServersController::serverSettings() - APP/Controller/ServersController.php, line 717
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 491
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 92

2016-06-03 13:15:23 Notice: Notice (8): unserialize() [<a href='http://php.net/function.unserialize'>function.unserialize</a>]: Error at offset 0 of 5 bytes in [/var/www/MISP/app/Vendor/kamisama/
resque-status/src/ResqueStatus/ResqueStatus.php, line 127]
Trace:
unserialize - [internal], line ??
ResqueStatus\ResqueStatus::getWorkers() - APP/Vendor/kamisama/resque-status/src/ResqueStatus/ResqueStatus.php, line 127
Server::workerDiagnostics() - APP/Model/Server.php, line 2481
ServersController::serverSettings() - APP/Controller/ServersController.php, line 717
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 491
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 92

2016-06-03 13:15:23 Notice: Notice (8): unserialize() [<a href='http://php.net/function.unserialize'>function.unserialize</a>]: Error at offset 0 of 5 bytes in [/var/www/MISP/app/Vendor/kamisama/
resque-status/src/ResqueStatus/ResqueStatus.php, line 127]
Trace:
unserialize - [internal], line ??
ResqueStatus\ResqueStatus::getWorkers() - APP/Vendor/kamisama/resque-status/src/ResqueStatus/ResqueStatus.php, line 127
Server::workerDiagnostics() - APP/Model/Server.php, line 2481
ServersController::serverSettings() - APP/Controller/ServersController.php, line 717
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 491
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 92

2016-06-03 13:15:23 Notice: Notice (8): unserialize() [<a href='http://php.net/function.unserialize'>function.unserialize</a>]: Error at offset 0 of 5 bytes in [/var/www/MISP/app/Vendor/kamisama/
resque-status/src/ResqueStatus/ResqueStatus.php, line 127]
Trace:
unserialize - [internal], line ??
ResqueStatus\ResqueStatus::getWorkers() - APP/Vendor/kamisama/resque-status/src/ResqueStatus/ResqueStatus.php, line 127
Server::workerDiagnostics() - APP/Model/Server.php, line 2481
ServersController::serverSettings() - APP/Controller/ServersController.php, line 717
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - APP/Lib/cakephp/lib/Cake/Controller/Controller.php, line 491
Dispatcher::_invoke() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 193
Dispatcher::dispatch() - APP/Lib/cakephp/lib/Cake/Routing/Dispatcher.php, line 167
[main] - APP/webroot/index.php, line 92
potential bug

Most helpful comment

Found the problem - my fault. I started the install about a month ago and left it sit once i got most install/config stuff done. In the meantime this commit happened to the install doc: https://github.com/MISP/MISP/commit/0a4b26de24aa1a71afc932a3836c6a6e0128edfd

sudo apt-get install php5-redis
sudo php5enmod redis

fixed it. Sorry for the confusion.

All 4 comments

I just installed last night and noticed the same issue on Ubuntu 14. Two questions: Does this cause any issues with the background jobs? Is there any workaround or way to resolve it?

Hmm, haven't seen this issue before. Will try to set up a fresh 14.04
installation in a few days to give this a go.

On Mon, Aug 1, 2016 at 1:55 PM, kx499 [email protected] wrote:

I just installed last night and noticed the same issue on Ubuntu 14. Two
questions: Does this cause any issues with the background jobs? Is there
any workaround or way to resolve it?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MISP/MISP/issues/1204#issuecomment-236560832, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADf6wHDcrlqiaErdezU3kZOdjoSrV5zMks5qbd7KgaJpZM4It38Q
.

Found the problem - my fault. I started the install about a month ago and left it sit once i got most install/config stuff done. In the meantime this commit happened to the install doc: https://github.com/MISP/MISP/commit/0a4b26de24aa1a71afc932a3836c6a6e0128edfd

sudo apt-get install php5-redis
sudo php5enmod redis

fixed it. Sorry for the confusion.

excellent, thanks for your feedback. closing this now.

if this fix doesn't help you, @dspruell , please reopen this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garanews picture garanews  Â·  6Comments

honey4free picture honey4free  Â·  4Comments

haegardev picture haegardev  Â·  3Comments

yannw picture yannw  Â·  5Comments

bhuvan2099 picture bhuvan2099  Â·  7Comments