Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting Pandora Process Ends with MySQL 5.5

  • Pandora Process Ends with MySQL 5.5

    Posted by Tux on February 13, 2011 at 08:06

    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: 

    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

    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

    Nacho1988 replied 12 years, 7 months ago 3 Members · 3 Replies
  • 3 Replies
  • Tux

    Member
    February 15, 2011 at 19:08
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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.

  • dercol

    Member
    April 3, 2012 at 11:04
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I think I’ve found the problem:
    is an “algebric” matter.
    if unix_timestamp() – `pandora`.`tagente_estado`.`current_interval is 0 so the resolution should be a CAST.

    to apply the patch:

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

  • Nacho1988

    Member
    June 14, 2012 at 18:18
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Try updating mysqlclient lib,the problem seems to be a specific bug from mysql.

    Regards