Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pandora Process Ends with MySQL 5.5
#1
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:
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:
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
 Reply
#2
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.
 Reply
#3
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


Attached Files


.patch   usr_lib_perl5_PandoraFMS.patch (Size: 5.02 KB / Downloads: 175)
 Reply
#4
Try updating mysqlclient lib,the problem seems to be a specific bug from mysql.

Regards
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes