Misp: Scheduled tasks list is erroring out

Created on 1 Aug 2016  Â·  13Comments  Â·  Source: MISP/MISP

Work environment

| Questions | Answers |
| --- | --- |
| Type of issue | Bug |
| OS version (server) | Debian |
| PHP version | 5.6 |
| MISP version / git hash | 2.4.49, current as of 2016-08-01 14:00 |

Expected behavior

  • Display the list of scheduled tasks.

    Actual behavior

  • Erroring out wiht "an internal error has occured"

    Steps to reproduce the behavior

  • Go to the scheduled tasks list page.

potential bug support

All 13 comments

mabye there is additional information on this in MISPs error.log and/or the webservers error.log ?
that error message may appear for various reasons...

In error.log:

 2016-08-03 10:52:37 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Task.job_id' in 'field list'
 Request URL: /tasks
 Stack Trace:
 #0 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(461): PDOStatement->execute(Array)
 #1 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(427): DboSource->_execute('SELECT `Task`.`...', Array)
#2 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(669): DboSource->execute('SELECT `Task`.`...', Array, Array)
 #3 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Datasource/DboSource.php(1118): DboSource->fetchAll('SELECT `Task`.`...', false)
 #4 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Task), Array)
 #5 /var/www/MISP/app/Lib/cakephp/lib/Cake/Model/Model.php(3003): Model->_readDataSource('all', Array)
 #6 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Component/PaginatorComponent.php(196): Model->find('all', Array)
 #7 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(1086): PaginatorComponent->paginate(NULL, Array, Array)
 #8 /var/www/MISP/app/Controller/TasksController.php(29): Controller->paginate()
 #9 [internal function]: TasksController->index()
 #10 /var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(TasksController), Array)
 #11 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
 #12 /var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(TasksController), Object(CakeRequest))
 #13 /var/www/MISP/app/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
 #14 {main}

this seems related to the change from job_id to process_id in the tasks database table.
are you sure that your files, especially Tasks.php and TasksController.php are up to date?
what about "git status"?
and "grep -r job_id /YOUR/PATH/TO/app/ | grep Task" ?

@iglocska i'm not sure where the issue could be if his files are up to date, i found out that app/Config/Schema/schema.php is way out of date, but that would have been a problem in many other cases, if relevant...

Nah, we don't use the schema system of cake PHP. Will have a look at it
after the hackathon

On Aug 4, 2016 1:45 AM, "Andreas Ziegler" [email protected] wrote:

this seems related to the change from job_id to process_id in the tasks
database table.
are you sure that your files, especially Tasks.php and TasksController.php
are up to date?
what about "git status"?
and "grep -r job_id /YOUR/PATH/TO/app/ | grep Task" ?

@iglocska https://github.com/iglocska i'm not sure where the issue
could be if his files are up to date, i found out that
app/Config/Schema/schema.php is way out of date, but that would have been a
problem in many other cases, if relevant...

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MISP/MISP/issues/1395#issuecomment-237409417, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADf6wJTqyO_ZvGxYIunZOFlX5bqJZ6a2ks5qcSgCgaJpZM4JZifB
.

had the same issue last week but I just updated the db schema on my test vm. Updated today, reverted my db changes, and the issue is still there.
Will take a look at it today.

ok, so the issue is with cakePHP caching: the job_id was still stored in my "myapp_cake_core_method_cache" under "../app/tmp/cache/persistent". One could change the cache, clean it, but the fastest option is to remove the core_method_cache file: "rm /YOUR/PATH/TO/app/tmp/cache/persistent/myapp_cake_core_method_cache".

There is a nice and clean way to do it via the MISP interface ;-)

https:///servers/serverSettings/diagnostics -> "Clean cache model".

@adulau, thanks that fixed it.

Closing ticket and adding to misp-book (if not already there).

The weird thing is that this should be executed after each upgrade. The only explanation I can see is that the upgrade got somehow interrupted / stalled before getting to the cleanup. Very odd.

regarding schema, if we don't use it, it should be removed probably.

Yep, it's pretty much an ancient leftover thing. I mean it doesn't do any harm and might be a nice basis if we ever want to revisit it, but might just as well remove it.

the basis will always be there in the git history :P

True enough.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jezkerwin picture jezkerwin  Â·  7Comments

open-source-rs picture open-source-rs  Â·  6Comments

eCrimeLabs picture eCrimeLabs  Â·  4Comments

fl0x2208 picture fl0x2208  Â·  4Comments

RichieB2B picture RichieB2B  Â·  7Comments