Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to restore pandora backups
#1
Hi i have a pandora server installed and running "Centos based appliance 5.0sp1 x64" i like to migrate this server configuration to a new one, so i installed the same version on this server only difference is that is 32 bit appliance.
I followed the documentation guide:
"http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Server_Management#Backup_and_Complete_Recovery_of_Pandora_FMS"
Also tried using the document describing manual backup and restore (dump database reload database and copy console).
The problem is that after restoring the configuration in the new server pandora service seems to start ok, but i cannot access pandora console anymore if i connecto to port 80 i get the apache test page, but if i go to https pandora console dosen't load.

Somebody can point me how to fix this issue or theres some other way i can move my configuration to a new server ?.
Thanks.
 Reply
#2
Follow these checkpoints to find what could be the problem.

1. Check permissions in HTML publishing directory /var/www/html/pandora_console, should be apache ownership for all files. If not, chown -R apache * and try again.

2. Check if you can login with "pandora" mysql user with password provided in /var/www/html/pandora_console/include/config.php:

mysql -u pandora -D pandora -p

If not, check what happened there.

3. Chechk for errors at //var/www/html/pandora_console/pandora_console.log

Good luck !
 Reply
#3
Thanks for the reply, apache permissions look ok on /var/www/html/pandora_console just in case i overwrite them to apache:apache but this don't seem to fix the issue. Also i looked for pandora_console.log but i can't find it on the drive.
Cheked mysql pandora user and i can connect and do querys fine.

This problem seem to happen on any tests i done on diferent system this means that in case of having a pandora installation fail you cannot restore from a backup. Look like a important issue for pandora.

Also this forum have the most annoying captcha ever developed.
 Reply
#4
(12-24-2013, 01:31 PM)soviet9922 link Wrote: Thanks for the reply, apache permissions look ok on /var/www/html/pandora_console just in case i overwrite them to apache:apache but this don't seem to fix the issue. Also i looked for pandora_console.log but i can't find it on the drive.
Cheked mysql pandora user and i can connect and do querys fine.

This problem seem to happen on any tests i done on diferent system this means that in case of having a pandora installation fail you cannot restore from a backup. Look like a important issue for pandora.

Also this forum have the most annoying captcha ever developed.

Sorry for the capcha, we're besieged by spammers.

The backup recovery is something very commonly used, this usually works. Something "weird" is happening in your console and/or the procedure you're using. pandora_console.log is where the console output any error. If you don't have any clue there, checkout /var/log/httpd/error_log for anything suspicious.

by the way, just to be sure, do the chown -R (recursive), the most critical file there is include/config.php if doesnt have the correct permissions, it won't run.
 Reply
#5
The file pandora_console.log don't exists i search it on the disk.
Also the permissions of config.php seem to be ok. I applied apache owner and group permissions recursively as you sugested.
This is what i got on pandora logs.

********************************************************************************************************
pandora_server.error
********************************************************************************************************
2013-12-24 11:50:31 - pandora_mon.inswitch.us Starting Pandora FMS Server. Error logging activated.
DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 573.
DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 597.
DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
Thread 11 terminated abnormally: DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
Perl exited with active threads:
        5 running and unjoined
        5 finished and unjoined
        0 running and detached

*****************************************************************************************************
pandora_server.log
*****************************************************************************************************
2013-12-24 10:20:16 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1] Launching 5.0SP1 131120
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 1, Alert Threshold at 60, ServerName is 'pandora_mon.inswitch.us'
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1]  [*] Pandora FMS Enterprise module not available.
2013-12-24 11:50:32 pandora_mon.inswitch.us [V1]  [*] Netflow daemon disabled.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 573.

2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 597.

2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.

2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.

2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.

2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql:Confusedt execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.

2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' Shutdown by signal
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] 'pandora_mon.inswitch.us': DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.

2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server 'pandora_mon.inswitch.us' unhandled error.
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1] Launching 5.0SP1 131120
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 1, Alert Threshold at 60, ServerName is 'pandora_mon.inswitch.us'
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1]  [*] Pandora FMS Enterprise module not available.
2013-12-24 12:00:34 pandora_mon.inswitch.us [V1]  [*] Netflow daemon disabled.

 Reply
#6
I've done a full backup / restore between two Centos (different versions) and it works nice. These are the steps I've done, compare with your steps:

1. Do the backup in the running system:

/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp

2. Copy the tarball to the other machine.

3. Execute the backup restore command:

/usr/share/pandora_server/util/pandora_backup.sh -f -c /var/www/html/pandora_console -s /tmp/pandorafms_backup_2013-12-26-19-56-13.tar.gz

4. Change the server name on the destination host to be the same as original host

vi /etc/pandora/pandora_server.conf -> servername token changed.

5. Restart pandora_server:

/etc/init.d/pandora_server start

6. Access console.

You should check also

a) pandora user has the same DB password on both servers, if not, modify config.php and pandora_server.conf
b) no errors coming from SQL, like: "ERROR 1153 (08S01) at line 4692: Got a packet bigger than 'max_allowed_packet' bytes" (that means some tables was not loaded)
c) BE SURE your path has not changed, if in original file was "pandora_mysite" and later is installed in "pandora_site2" you need to change config.php

 Reply
#7
I tried and verified each of the points you mentioned on your post.
DB Pass is ok
Host name is ok
Permissions are ok
Path is the same
The only difference is that the old server is a 64 bit pandora install and the new server is 32 bit.

Im getting out of options
 Reply
#8
Hello

Try granting all privileges again in the database such as you have configured in the pandora_server.conf.

mysql -u root

grant all privileges on ddbb_name.* to 'ddbb_user'@'localhost' identified by 'mypasswd';

flush privileges;

Regards

 Reply
#9
Ok after having another guy who installed the original server look at the problem, he found the culprit.
Look like he enabled https on the old apache server. So when i load the backup configuration having no ssl certs i cannot use HTTP nor HTTPS on the new server. Genearting new certs fix the problem.

Thanks all for your help Smile
 Reply


Users browsing this thread: 2 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