quarkslab/irma-brain

Proble list error

Closed this issue · 2 comments

Description:
The error is visible in the celery brain log file. If this occurs, for instance, the probes are not listed in the web front end. It occurs on 1 out of 2 uploads.

Occurrence:
This occurs sporadic.

When:
It happens when the main page of the interface is called and when the upload is finished.

Log Trace:

[2014-04-28 11:25:07,589: ERROR/MainProcess] Received unregistered task of type u'brain.tasks.probe_list'.
The message has been ignored and discarded.

Did you remember to import the module containing this task?
Or maybe you are using relative imports?
Please see http://bit.ly/gLye1c for more information.

The full contents of the message body was:
{u'utc': True, u'chord': None, u'args': [], u'retries': 0, u'expires': None, u'task': u'brain.tasks.probe_list', u'callbacks': None, u'errbacks': None, u'timelimit': [None, None], u'taskset': None, u'kwargs': {}, u'eta': None, u'id': u'bd2cbbd2-5a04-4343-bb87-c71012690670'} (259b)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/worker/consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: u'brain.tasks.probe_list'

This bug is related to irma-frontend instead of irma-brain. The issue comes from our celery app configuration (method conf_brain_celery() in config/parser.py). As we connect to the brain queue in this method, celery considers that we are able to receive messages that are sent to the brain, making the app output this error. The bug has been fixed in commit quarkslab/irma-frontend@ca4f2e3 on irma-frontend.

The above fix introduced a regression. The commit quarkslab/irma-frontend@5088ef3 fixes the issue.

Many thanks to jhemp and aquint for the solution.