Page 2 of 2
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 7:13 am
by ITOMB_IMT
#mysql -V
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
MariaDB [nagiosql]> SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE\G;
*************************** 1. row ***************************
@@SQL_MODE:
@@GLOBAL.SQL_MODE:
1 row in set (0.00 sec)
ERROR: No query specified
I have sent a PM with the httpd error log and Mariadb.log please have a look.
Thanks,
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 10:43 am
by ITOMB_IMT
Currently we have one server running wit 5.5.11, but i don't see such an issue for a user where hosts/services disappear.
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 11:27 am
by benjaminsmith
Hi
@ISSB_MAOST,
190517 3:46:18 [ERROR] Slave SQL: Could not execute Write_rows event on table nagios.nagios_servicestatus; Duplicate entry '18665' for key 'object_id', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mariadb-bin.000002, end_log_pos 55291742, Error_code: 1062
190517 3:46:18 [Warning] Slave: Duplicate entry '18665' for key 'object_id' Error_code: 1062
190517 3:46:18 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mariadb-bin.000002' position 55291130
After looking through the database log, it looks like you have setup database replication, and it's having issues. Can you repair the replication?
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 11:37 am
by ITOMB_IMT
HI, i reapired the replication and tried, but seeing the hosts& services disappear. i sent you a PM of mariadb.log please have a look
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 3:27 pm
by benjaminsmith
Hi
@ISSB_MAOST,
Are you able to generate a system profile yet? Looking at your log files, your still having issues with the database replication.
190517 11:52:38 [ERROR] Failed to open the relay log './mariadb-relay-bin.000008' (relay_log_pos 3414121)
190517 11:52:38 [ERROR] Could not find target log during relay log initialization
190517 11:52:38 [ERROR] Failed to initialize the master info structure
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 3:46 pm
by ITOMB_IMT
I have disabled replication and wiped out replication completely. and tested again but still no luck and am not able to download profile.
Re: Hosts and services disappears for a while
Posted: Fri May 17, 2019 4:02 pm
by benjaminsmith
Hi,
The following command will check for corrupted tables. If it doesn't output anything, the tables are ok.
Code: Select all
echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table | grep NULL
If you have any crashed tables, the following will repair the databases.
Code: Select all
mysqlcheck -r -f -uroot -pnagiosxi --all-databases --use_frm
If the issue persists, please open a support ticket at the link below and reference this thread as we may need to take a closer look at your system.
https://support.nagios.com/tickets/