Hello Guest

Author Topic: Pandora Process Ends with MySQL 5.5  (Read 3116 times)

0 Members and 1 Guest are viewing this topic.

Offline Tux

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Pandora Process Ends with MySQL 5.5
« on: February 12, 2011, 08:06:23 PM »
Hi all,

A few days ago I updated MySQL to verson 5.5 through my Linux distribution. All my databases are up and running except I noticed the PandoraFMS server process has a difficult time staying alive. Today I logged into the Pandora console and noticed "ALL SYSTEMS DOWN". I checked in my pandora.server.error log and I see the following: 
Code: [Select]
DBD::mysql::st execute failed: Query execution was interrupted at /usr/lib/perl5/PandoraFMS/DB.pm line 271.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 423.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 423.
Perl exited with active threads:
18 running and unjoined
0 finished and unjoined
So I have to manually restart the Pandora server, but it is only a matter of time when the server breaks again and the console will report "ALL SYSTEMS DOWN". I have tried to repair the MySQL database and completely re-install MySQL along with no luck.

When I am viewing an agent, if I click the green "flag" ball, Pandora panics with the following
Code: [Select]
DBD::mysql::st execute failed: BIGINT UNSIGNED value is out of range in '((unix_timestamp() - `pandora`.`tagente_estado`.`current_interval`) - `pandora`.`tagente_estado`.`last_execution_try`)' at /usr/lib/perl5/PandoraFMS/DB.pm line 317.
I tried to downgrade to MySQL but that is not an option because it only presented more problems for me as I couldn't get it to cooperate with all my database (not just Pandora) even after starting fresh. Any help on figuring out how to resolve this problem is greatly appreciated.

Cheers

Offline Tux

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Pandora Process Ends with MySQL 5.5
« Reply #1 on: February 15, 2011, 07:08:54 AM »
I went and had to start PandoraFMS from scratch by re-creating the database and new tables still using MySQL for the backend. So now the problem I was facing seems to have been solved. I tried to repeat the steps that caused PandoraFMS to crash with the MySQL DB, but PandoraFMS no longer seems to crash. I suppose starting fresh seems to be the only way to avoid those problems I was experiencing as described in the first post. This was only with MySQL 5.5.9 (recent MySQL update), <=5.1 was working fine.

As a side note, I would like to see support for PostgreSQL with PandoraFMS. I feel PostgreSQL is far more advanced than MySQL.

Offline dercol

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: Pandora Process Ends with MySQL 5.5
« Reply #2 on: April 03, 2012, 12:04:43 AM »
I think I've found the problem:
is an "algebric" matter.
if unix_timestamp() - `pandora`.`tagente_estado`.`current_interval is < 0 then you have a signed value but unix_timestamp is suppose only to be > 0 so the resolution should be a CAST.

to apply the patch:

cd /usr/lib/perl5/PandoraFMS/
patch -p0 < usr_lib_perl5_PandoraFMS.patch

Offline Nacho

  • Administrator
  • Smart member
  • *****
  • Posts: 250
  • Karma: 0
    • View Profile
Re: Pandora Process Ends with MySQL 5.5
« Reply #3 on: June 14, 2012, 07:18:39 AM »
Try updating mysqlclient lib,the problem seems to be a specific bug from mysql.

Regards