From tyler.keith on April 29, 2014 11:40:34
The configuration should be set to the MySQLDataStore in order to reproduce this error.
In grr-server.yaml specify Worker.worker_process_count: 2 then start the worker:
/usr/bin/python /usr/bin/grr_server --start_worker --config=/etc/grr/grr-server.yaml
ERROR:2014-04-29 18:31:45,374 worker:251] Error processing session aff4:/flows/W:Foreman: (2014, "Commands out of sync; you can't run this command now")
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/worker.py", line 239, in _ProcessMessages
time.time() - now)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/aff4.py", line 1603, in exit
self.Close()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/aff4.py", line 1269, in Close
self.transaction.Commit()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 516, in Commit
self._RemoveLock()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 526, in _RemoveLock
(self.expires_lock, self.subject, self.subject))
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 79, in Execute
self.cursor.execute(*args)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method DictCursor.del of <MySQLdb.cursors.DictCursor object at 0x51938d0>> ignored
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, *_self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/worker/worker.py", line 77, in StartWorker
worker_obj.Run()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/worker.py", line 87, in Run
processed = self.RunOnce()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/worker.py", line 122, in RunOnce
sessions_available = queue_manager.GetSessionsFromQueue(self.queue)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/queue_manager.py", line 455, in GetSessionsFromQueue
token=self.token, limit=10000):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_store.py", line 325, in ResolveRegex
limit=limit):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 295, in MultiResolveRegex
return result.iteritems()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 68, in exit
self.Commit()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 75, in Commit
self.dbh.commit()
OperationalError: (2013, 'Lost connection to MySQL server during query')
ERROR:2014-04-29 18:31:45,449 flow:995] Error in WellKnownFlow.ProcessMessage: 'NoneType' object is not callable
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/flow.py", line 993, in _SafeProcessMessage
self.ProcessMessage(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/flows/general/administrative.py", line 351, in ProcessMessage
self.foreman_cache.AssignTasksToClient(message.source)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/aff4_objects/aff4_grr.py", line 548, in AssignTasksToClient
client.Set(client.Schema.LAST_FOREMAN_TIME(latest_rule))
TypeError: 'NoneType' object is not callable
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, *_self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/worker/worker.py", line 77, in StartWorker
worker_obj.Run()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/worker.py", line 87, in Run
processed = self.RunOnce()
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/worker.py", line 122, in RunOnce
sessions_available = queue_manager.GetSessionsFromQueue(self.queue)
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/queue_manager.py", line 455, in GetSessionsFromQueue
token=self.token, limit=10000):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_store.py", line 325, in ResolveRegex
limit=limit):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 277, in MultiResolveRegex
for row in cursor.Execute(query, args):
File "/usr/local/lib/python2.7/dist-packages/grr-0.2-py2.7.egg/grr/lib/data_stores/mysql_data_store.py", line 79, in Execute
self.cursor.execute(*args)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method DictCursor.del of <MySQLdb.cursors.DictCursor object at 0x5193510>> ignored
ERROR:2014-04-29 18:31:54,216 worker:56] Worker 2780 is dead
ERROR:2014-04-29 18:31:54,216 worker:56] Worker 2784 is dead
Original issue: http://code.google.com/p/grr/issues/detail?id=103