Page 1 of 1
v5.4.0 upd error: Error backing up MySQL database 'nagios'
Posted: Tue Jan 10, 2017 5:33 am
by gpi
Errors when trying to update from nagiosxi v5.3.4 to v5.4.0:
---- Starting Nagios XI Backup ----
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'snmp' already loaded in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/share/perfdata/sitesphp.cen.intranet/_HOST_.rrd: file changed as we read it
tar: /usr/local/nagios/share/perfdata/sitesphp.cen.intranet: file changed as we read it
tar: /usr/local/nagios/share/perfdata/wcsdlv1.tic1.intranet: file changed as we read it
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got errno 28 on write
Error backing up MySQL database 'nagios' - check the password in this script!
To my knowledge this password hasn't changed and all previous updates/upgrades worked seamlessly.
The final recomendation from the upgrade option is:
The update did not complete successfully. Please try updating manually.
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 9:38 am
by rkennedy
Please run the following commands to verify the default credentials -
Code: Select all
mysql -uroot -pnagiosxi
mysql -unagiosxi -pn@gweb
mysql -undoutils -pn@gweb
If any of those fail, then see this doc for what needs to be updated -
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 11:33 am
by gpi
Thanks,
The result is OK for root & ndoutils, but not for nagiosxi:
[root@nagiosxi ~]# mysql -unagiosxi -pn@gweb
ERROR 1045 (28000): Access denied for user 'nagiosxi'@'localhost' (using password: YES)
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 11:35 am
by rkennedy
You'll want to make sure the nagiosxi user's password has been updated in all places. Take a look at
https://assets.nagios.com/downloads/nag ... ios-XI.pdf specifically under the 'NAGIOSXI' part -
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 12:07 pm
by gpi
Hi.
User nagiosxi does not exist:
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> set password for 'nagiosxi'@localhost= password('MyPass);
ERROR 1133 (42000): Can't find any matching row in the user table
thanks
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 1:52 pm
by SteveBeauchemin
in MySQL
try this
GRANT ALL ON nagiosxi.* TO nagiosxi@'localhost' IDENTIFIED BY 'nagiosxi';
where
nagiosxi.* is the nagiosxi database
nagiosxi@localhost is the user
BY 'nagiosxi' is the password.
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Tue Jan 10, 2017 2:09 pm
by dwhitfield
Thanks again
@SteveBeauchemin!
@gpi, does that get you up and running?
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Wed Jan 11, 2017 4:07 am
by gpi
Thanks a bunch Mr Whitfield!!!
Solution:
Code: Select all
[root@nagiosxi ~]# mysql -uroot -pnagiosxi
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 416474
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT ALL ON nagiosxi.* TO nagiosxi@'localhost' IDENTIFIED BY 'n@gweb';
Query OK, 0 rows affected (0.08 sec)
mysql>
And Upgrade Re-Run:
Code: Select all
---- Starting Nagios XI Backup ----
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'snmp' already loaded in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/share/perfdata/bsf.bsf.intranet: file changed as we read it
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up MySQL databases...
Backing up PostgresQL databases...
Backing up cronjobs for Apache...
Backing up logrotate config files...
Backing up Apache config files...
Compressing backup...
gzip: stdout: No space left on device
===============
BACKUP COMPLETE
===============
Backup stored in /store/backups/nagiosxi/autoupgrade_backup.1484124119.tar.gz
---- Starting Nagios XI Upgrade ----
Cleaning up temp directory...
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'snmp' already loaded in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'snmp' already loaded in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.
...
...
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Control de login a instancias DB Oracle' on host 'bd_jmnh' (config file '/usr/local/nagios/etc/services/Oracle_DB_Login.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 801 services.
Checked 477 hosts.
Checked 37 host groups.
Checked 2 service groups.
Checked 22 contacts.
Checked 4 contact groups.
Checked 199 commands.
Checked 27 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 477 hosts
Checked 0 service dependencies
Checked 22 host dependencies
Checked 27 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Fixing php-mcrypt bug...
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'snmp' already loaded in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.
Nagios XI Upgrade Complete!
---------------------------
Re: v5.4.0 upd error: Error backing up MySQL database 'nagio
Posted: Wed Jan 11, 2017 9:56 am
by tgriep
I saw a No space left on device message when you ran the upgrade.
I would assume that the hard drive is full and that is causing the error.
Run the following as root to determine if the drive is full. Post the output.
If the drive is full, you can follow the guide below to resize the drive if Nagios XI is running on a VMWare server.
https://assets.nagios.com/downloads/nag ... M-Disk.pdf