shinken-monitoring / mod-livestatus

Shinken module for presenting data with a MK/Livestatus comptabile interface
GNU Affero General Public License v3.0
15 stars 20 forks source link

Livestatus 1.01 unexpected crash #65

Closed fullmetalucard closed 9 years ago

fullmetalucard commented 9 years ago

Hello,

I'm actually trying two connect a realm to a shinken master server. The master server is setup with shinken 2.0.4 and livestatus 1.0.1 (Debian Squeeze): This one works well. We had to setup and connect a realm to the master server. So we started installing the exact same versions of shinken and livestatus. When starting the realm server, we encounter a livestatus crash after he loads logstore-sqlite. Here is the trace frome brokerd.log:

2015-06-09 14:17:45,987 [1433852265] Error : [broker-OVH] The external module livestatus goes down unexpectedly! 2015-06-09 14:17:47,539 [1433852267] Error : [Logstore SQLite] An error occurred: no such table: logs 2015-06-09 14:17:49,311 [1433852269] Warning : [broker-OVH] Connection problem to the poller poller-OVH: Connexion error to http://X.X.X.X:7771/ : Operation timed out after 3001 milliseconds with 0 bytes received 2015-06-09 14:17:49,392 [1433852269] Error : [broker-OVH] the module livestatus just crash! Please look at the traceback: 2015-06-09 14:17:49,392 [1433852269] Error : [broker-OVH] Traceback (most recent call last): File "/var/lib/shinken/modules/livestatus/module.py", line 225, in main self.do_main() File "/var/lib/shinken/modules/livestatus/module.py", line 286, in do_main self.manage_lql_thread() File "/var/lib/shinken/modules/livestatus/module.py", line 482, in manage_lql_thread self.db.commit_and_rotate_log_db() File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 237, in commit_and_rotate_log_db self.log_db_do_archive() File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 331, in log_db_do_archive for day in self.log_db_historic_contents(): File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 257, in log_db_historic_contents dbresults = tuple( self.select('SELECT MIN(time), MAX(time) FROM logs') ) File "/var/lib/shinken/modules/logstore-sqlite/module.py", line 394, in select self.dbcursor.execute(cmd, values) OperationalError: no such table: logs

Do you have anye idea of what's going wrong?

P.S: we canot upgrade master server's version actually, so i guess we must use the exact same versions?

Thx for your help Regards,

fullmetalucard commented 9 years ago

Hi, we succeeded in re creating (doing the create table with sqlite3 commands) the livelogs.db file which wasn't correctly fulfilled by the logstore-sqlite module at its initialisation. Then it was working and livestatus stopped crashing. I admit we finally got around the issue by migrating in 2.4.1 where we didn't encountered this error anymore.