Unable to start Database Backend

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Unable to start Database Backend

Post by [email protected] »

Hi,

We recently upgrade the Nagios XI to 5.4.0 then after few days we got Database Backend as critical, unable to clear the alert even though getting success message when i start it.


I have tried few basic steps based on the posts.

1. # free -m
total used free shared buff/cache available
Mem: 3783 1424 1654 66 704 1969
Swap: 3967 0 3967


2. cd /usr/local/nagiosxi/scripts
./repair_databases.sh

Output:

Code: Select all

DATABASE: nagios
TABLE:
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-01-29 22:59:59 MST; 32min ago
  Process: 60339 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 60302 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 60338 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─60338 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─60521 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-fi...

Jan 29 22:59:57 cs1-prd-cmn-nag01 systemd[1]: Starting MariaDB database server...
Jan 29 22:59:57 cs1-prd-cmn-nag01 mysqld_safe[60338]: 170129 22:59:57 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jan 29 22:59:57 cs1-prd-cmn-nag01 mysqld_safe[60338]: 170129 22:59:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jan 29 22:59:59 cs1-prd-cmn-nag01 systemd[1]: Started MariaDB database server.
/var/lib/mysql/nagios /usr/local/nagiosxi/scripts
Failed to stop mysqld.service: Unit mysqld.service not loaded.
- recovering (with sort) MyISAM-table 'nagios_acknowledgements.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_commands.MYI'
Data records: 128
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_commenthistory.MYI'
Data records: 226
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_comments.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_configfiles.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_configfilevariables.MYI'
Data records: 131
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_conninfo.MYI'
Data records: 386
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_contact_addresses.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactgroup_members.MYI'
Data records: 12
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactgroups.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contact_notificationcommands.MYI'
Data records: 144
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactnotificationmethods.MYI'
Data records: 692
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_contactnotifications.MYI'
Data records: 692
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_contacts.MYI'
Data records: 12
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_contactstatus.MYI'
Data records: 12
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_customvariables.MYI'
Data records: 552
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_customvariablestatus.MYI'
Data records: 552
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with keycache) MyISAM-table 'nagios_dbversion.MYI'
Data records: 1

---------

- recovering (with sort) MyISAM-table 'nagios_downtimehistory.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_eventhandlers.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_externalcommands.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_flappinghistory.MYI'
Data records: 446
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_hostchecks.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_contactgroups.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_contacts.MYI'
Data records: 59
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostdependencies.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalation_contactgroups.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalation_contacts.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostescalations.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostgroup_members.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hostgroups.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_host_parenthosts.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_hosts.MYI'
Data records: 53
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_hoststatus.MYI'
Data records: 53
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
- Fixing index 7
- Fixing index 8
- Fixing index 9
- Fixing index 10
- Fixing index 11
- Fixing index 12
- Fixing index 13
- Fixing index 14
- Fixing index 15
- Fixing index 16
- Fixing index 17
- Fixing index 18
- Fixing index 19

---------

- recovering (with sort) MyISAM-table 'nagios_instances.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_logentries.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_notifications.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_objects.MYI'
Data records: 1473
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5

---------

- recovering (with sort) MyISAM-table 'nagios_processevents.MYI'
Data records: 1911
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'nagios_programstatus.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_runtimevariables.MYI'
Data records: 18
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_scheduleddowntime.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicechecks.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4

---------

- recovering (with sort) MyISAM-table 'nagios_service_contactgroups.MYI'
Data records: 12
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_service_contacts.MYI'
Data records: 707
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicedependencies.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalation_contactgroups.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalation_contacts.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_serviceescalations.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicegroup_members.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_servicegroups.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_service_parentservices.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_services.MYI'
Data records: 512
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_servicestatus.MYI'
Data records: 512
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
- Fixing index 7
- Fixing index 8
- Fixing index 9
- Fixing index 10
- Fixing index 11
- Fixing index 12
- Fixing index 13
- Fixing index 14
- Fixing index 15
- Fixing index 16
- Fixing index 17
- Fixing index 18
- Fixing index 19

---------

- recovering (with sort) MyISAM-table 'nagios_statehistory.MYI'
Data records: 13677
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_systemcommands.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3

---------

- recovering (with sort) MyISAM-table 'nagios_timedeventqueue.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6

---------

- recovering (with sort) MyISAM-table 'nagios_timedevents.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6

---------

- recovering (with sort) MyISAM-table 'nagios_timeperiods.MYI'
Data records: 18
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'nagios_timeperiod_timeranges.MYI'
Data records: 103
- Fixing index 1
- Fixing index 2
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============
DATABASE: nagiosql
TABLE:
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-01-29 23:33:03 MST; 277ms ago
  Process: 6592 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 6518 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 6591 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─6591 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─6745 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-fil...

Jan 29 23:32:59 cs1-prd-cmn-nag01 systemd[1]: Starting MariaDB database server...
Jan 29 23:33:00 cs1-prd-cmn-nag01 mysqld_safe[6591]: 170129 23:33:00 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jan 29 23:33:00 cs1-prd-cmn-nag01 mysqld_safe[6591]: 170129 23:33:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jan 29 23:33:03 cs1-prd-cmn-nag01 systemd[1]: Started MariaDB database server.
/var/lib/mysql/nagiosql /usr/local/nagiosxi/scripts
Failed to stop mysqld.service: Unit mysqld.service not loaded.
- recovering (with sort) MyISAM-table 'tbl_command.MYI'
Data records: 132
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contactgroup.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contact.MYI'
Data records: 11
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_contacttemplate.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_domain.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostdependency.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostescalation.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostextinfo.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hostgroup.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_host.MYI'
Data records: 53
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_hosttemplate.MYI'
Data records: 50
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_info.MYI'
Data records: 218
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactgroupToContact.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandHost.MYI'
Data records: 2
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToCommandService.MYI'
Data records: 2
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContactgroup.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToContacttemplate.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContacttemplateToVariabledefinition.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandHost.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToCommandService.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToContacttemplate.MYI'
Data records: 11
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkContactToVariabledefinition.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_DH.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_DH.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHostgroup_H.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostdependencyToHost_H.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToContact.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostescalationToHost.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostgroupToHost.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContactgroup.MYI'
Data records: 4
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToContact.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHostgroup.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHost.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToHosttemplate.MYI'
Data records: 48
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHosttemplateToVariabledefinition.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToContact.MYI'
Data records: 59
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHost.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToHosttemplate.MYI'
Data records: 53
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkHostToVariabledefinition.MYI'
Data records: 52
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_DH.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_DH.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHostgroup_H.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToHost_H.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_DS.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicedependencyToService_S.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToContact.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToHost.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceescalationToService.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToServicegroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicegroupToService.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContactgroup.MYI'
Data records: 1
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToContact.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToHost.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicegroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToServicetemplate.MYI'
Data records: 81
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServicetemplateToVariabledefinition.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContactgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToContact.MYI'
Data records: 629
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHostgroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToHost.MYI'
Data records: 434
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicegroup.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToServicetemplate.MYI'
Data records: 434
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkServiceToVariabledefinition.MYI'
Data records: 422
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_lnkTimeperiodToTimeperiod.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_logbook.MYI'
Data records: 0
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_mainmenu.MYI'
Data records: 7
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_servicedependency.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_serviceescalation.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_serviceextinfo.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_servicegroup.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_service.MYI'
Data records: 512
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_servicetemplate.MYI'
Data records: 83
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_session_locks.MYI'
Data records: 2
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_session.MYI'
Data records: 2
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_settings.MYI'
Data records: 12
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_submenu.MYI'
Data records: 29
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_timedefinition.MYI'
Data records: 109
- Fixing index 1

---------

- recovering (with sort) MyISAM-table 'tbl_timeperiod.MYI'
Data records: 17
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_user.MYI'
Data records: 2
- Fixing index 1
- Fixing index 2

---------

- recovering (with sort) MyISAM-table 'tbl_variabledefinition.MYI'
Data records: 474
- Fixing index 1
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============
DATABASE: nagiosxi
TABLE:
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-01-29 23:33:09 MST; 430ms ago
  Process: 7642 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 7604 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 7641 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─7641 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─7824 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-fil...

Jan 29 23:33:06 cs1-prd-cmn-nag01 systemd[1]: Starting MariaDB database server...
Jan 29 23:33:07 cs1-prd-cmn-nag01 mysqld_safe[7641]: 170129 23:33:07 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jan 29 23:33:07 cs1-prd-cmn-nag01 mysqld_safe[7641]: 170129 23:33:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jan 29 23:33:09 cs1-prd-cmn-nag01 systemd[1]: Started MariaDB database server.
/var/lib/mysql/nagiosxi /usr/local/nagiosxi/scripts
Failed to stop mysqld.service: Unit mysqld.service not loaded.
- recovering (with sort) MyISAM-table 'xi_eventqueue.MYI'
Data records: 0
- Fixing index 1
- Fixing index 2
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============

=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded

3. no file or directory related to mysql in /etc/init.d/


4. # mysql

Output:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)







Thanks,
Last edited by rkennedy on Fri Feb 03, 2017 10:13 am, edited 2 times in total.
Reason: Please use code tags for output.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to start Database Backend

Post by rkennedy »

This was a display error present in 5.4.0 - it should be fixed in 5.4.1. Can you please upgrade, and let us know if it still persists?
Former Nagios Employee
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Unable to start Database Backend

Post by [email protected] »

Hi,

I just upgraded to 5.4.1 but still the error Database Backend persists.

Thanks,
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Unable to start Database Backend

Post by dwhitfield »

Can you please send us a screenshot of what you are seeing so that we can confirm it is the bug we thought was fixed in 5.4.1?

Also, are you able to log into MariaDB/MySQL when using a password?
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Unable to start Database Backend

Post by [email protected] »

Hi,

Please find the attached screen shot for reference. Present we don't have any alert but database not refreshed it is showing old alerts.

Error show below when I execute mysql command.

[root@cs1-prd-cmn-nag01 ~]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@cs1-prd-cmn-nag01 ~]#


success execute.

[root@cs1-prd-cmn-nag01 ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 75491
Server version: 5.5.52-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>




Thanks,
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to start Database Backend

Post by ssax »

What is the output of these commands:

Code: Select all

service ndo2db status
ps aux | grep ndo
Thank you
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Unable to start Database Backend

Post by [email protected] »

Hi,


# service ndo2db status
ndo2db is not running but subsystem locked



Thanks,
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Unable to start Database Backend

Post by [email protected] »

Hi,

I have resolved Database Backend issue by following the steps in the below link.

https://connexeon.com/linux/nagios-ndo2 ... nd-socket/


But showing unknown status for ndo2db service. How do we get it normal, Please find the screen shot for reference.


Thanks,
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to start Database Backend

Post by rkennedy »

What is the output of service ndo2db status from the CLI of the machine? Can you also show us how the service is setup specifically with the check_command?
Former Nagios Employee
[email protected]
Posts: 34
Joined: Mon Sep 26, 2016 1:37 pm

Re: Unable to start Database Backend

Post by [email protected] »

Hi,

Service ndo2db status output:


[root@cs1-prd-cmn-nag01 ~]# service ndo2db status
ndo2db (pid 21595) is running...
[root@cs1-prd-cmn-nag01 ~]#

check command output:


define service {
host_name localhost
service_description Service Status - ndo2db
use local-service
check_command check_xi_service_status!ndo2db!!!!!!
register 1
}


Please find the web screen shot

Thanks,
You do not have the required permissions to view the files attached to this post.
Locked