Databse Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Databse Error

Post by sandeepatil »

Not found mysqld service also,

Code: Select all

[root@nodea log]# service mysqld restart
Redirecting to /bin/systemctl restart  mysqld.service
Failed to restart mysqld.service: Unit mysqld.service failed to load: No such file or directory.
You have mail in /var/spool/mail/root
[root@nodea log]# service mariadb restart
Redirecting to /bin/systemctl restart  mariadb.service
[root@nodea log]#
Please check mariadb logs,

Code: Select all

[root@nodea mariadb]# tail -50 /var/log/mariadb/mariadb.log

2017-06-22  3:27:10 140351405497088 [Note] Event Scheduler: Purging the queue. 0 events
2017-06-22  3:27:10 140350588966656 [Note] InnoDB: FTS optimize thread exiting.
2017-06-22  3:27:10 140351405497088 [Note] InnoDB: Starting shutdown...
2017-06-22  3:27:11 140351405497088 [Note] InnoDB: Shutdown completed; log sequence number 1680257
2017-06-22  3:27:11 140351405497088 [Note] /usr/libexec/mysqld: Shutdown complete

2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: The InnoDB memory heap is disabled
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Compressed tables use zlib 1.2.7
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Using Linux native AIO
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Using generic crc32 instructions
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Completed initialization of buffer pool
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: 128 rollback segment(s) are active.
2017-06-22  3:27:12 140298582018176 [Note] InnoDB: Waiting for purge to start
2017-06-22  3:27:12 140298582018176 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1680257
2017-06-22  3:27:12 140297782683392 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-06-22  3:27:12 140298582018176 [Note] Plugin 'FEEDBACK' is disabled.
2017-06-22  3:27:12 140298582018176 [Warning] GSSAPI plugin : default principal 'mariadb/nodea.techmahindra.com@' not found in keytab
2017-06-22  3:27:12 140298582018176 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.  Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
2017-06-22  3:27:12 140298582018176 [ERROR] Plugin 'gssapi' init function returned error.
2017-06-22  3:27:12 140298582018176 [Note] Server socket created on IP: '::'.
2017-06-22  3:27:12 140298582018176 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.17-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_logentries.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_logentries.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] Got an error from thread_id=43, /builddir/build/BUILD/mariadb-10.1.17/storage/myisam/mi_write.c:227
2017-06-22  3:27:21 140298580810496 [ERROR] MySQL thread id 43, OS thread handle 0x7f99cf125b00, query id 11 localhost ndoutils update
INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1498082223), entry_time=FROM_UNIXTIME(1498082223), entry_time_usec='593398', logentry_type='262144', logentry_data='ndomod: Error writing to data sink!  Some output may get lost\.\.\.', realtime_data='1', inferred_data_extracted='1'
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_servicestatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] Got an error from thread_id=43, /builddir/build/BUILD/mariadb-10.1.17/storage/myisam/mi_write.c:227
2017-06-22  3:27:21 140298580810496 [ERROR] MySQL thread id 43, OS thread handle 0x7f99cf125b00, query id 18 localhost ndoutils update
INSERT INTO nagios_servicestatus SET instance_id='1', service_object_id='10', status_update_time=FROM_UNIXTIME(1498082223), output='â httpd\.service - The Apache HTTP Server', long_output='   Loaded: loaded \(/usr/lib/systemd/system/httpd\.service; enabled; vendor preset: disabled\)\\n   Active: active \(running\) since Wed 2017-06-21 02:36:56 IST; 24h ago\\n     Docs: man:httpd\(8\)\\n           man:apachectl\(8\)\\n  Process: 4181 ExecStop=/bin/kill -WINCH \${MAINPID} \(code=exited, status=0/SUCCESS\)\\n  Process: 27853 ExecReload=/usr/sbin/httpd \$OPTIONS -k graceful \(code=exited, status=0/SUCCESS\)\\n Main PID: 4981 \(httpd\)\\n   Status: \"Total requests: 628; Current requests/sec: 0; Current traffic:   0 B/sec\"\\n   CGroup: /system\.slice/httpd\.service\\n           ââ4131 /usr/sbin/httpd -DFOREGROUND\\n           ââ4133 /usr/sbin/httpd -DFOREGROUND\\n           ââ4134 /usr/sbin/httpd -DFOREGROUND
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_hoststatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] Got an error from thread_id=43, /builddir/build/BUILD/mariadb-10.1.17/storage/myisam/mi_write.c:227
2017-06-22  3:27:21 140298580810496 [ERROR] MySQL thread id 43, OS thread handle 0x7f99cf125b00, query id 20 localhost ndoutils update
INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='164', status_update_time=FROM_UNIXTIME(1498082225), output='CRITICAL - 10\.10\.237\.190: Host unreachable @ 10\.10\.237\.223\. rta nan, lost 100%', long_output='', perfdata='rta=0\.000ms;3000\.000;5000\.000;0; pl=100%;80;100;; rtmax=0\.000ms;;;; rtmin=0\.000ms;;;;', current_state='1', has_been_checked='1', should_be_scheduled='1', current_check_attempt='5', max_check_attempts='5', last_check=FROM_UNIXTIME(1498082222), next_check=FROM_UNIXTIME(1498082525), check_type='0', last_state_change=FROM_UNIXTIME(1491252101), last_hard_state_change=FROM_UNIXTIME(1491252101), last_hard_state='1', last_time_up=FROM_UNIXTIME(1491251909), last_time_down=FROM_UNIXTIME(1498082225), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(1498081225), next_notification=FROM_UNIXTIME(1498084825), no_more_notifications='0', notifications_enab
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_customvariablestatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] mysqld: Incorrect key file for table './nagios/nagios_customvariablestatus.MYI'; try to repair it
2017-06-22  3:27:21 140298580810496 [ERROR] Got an error from thread_id=43, /builddir/build/BUILD/mariadb-10.1.17/storage/myisam/mi_write.c:227
2017-06-22  3:27:21 140298580810496 [ERROR] MySQL thread id 43, OS thread handle 0x7f99cf125b00, query id 21 localhost ndoutils update
INSERT INtO nagios_customvariablestatus SET instance_id='1', object_id='164',status_update_time=FROM_UNIXTIME(1498082225), has_been_modified='0', varname='XIWIZARD', varvalue='linux-server' ON DUPLICATE KEY UPDATE instance_id='1', object_id='164',status_update_time=FROM_UNIXTIME(1498082225), has_been_modified='0', varname='XIWIZARD', varvalue='linux-server'
You have mail in /var/spool/mail/root
[root@nodea mariadb]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Databse Error

Post by tgriep »

Lets run this alternate command to repair the mariadb database. Run the following as root.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --all-databases --use_frm
After it is finished, restart mariadb by running

Code: Select all

systemctl restart  mariadb.service
Then check the /var/log/mariadb/mariadb.log log file for any new errors after the restart.
If it is clean, can you login to the XI GUI now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Databse Error

Post by sandeepatil »

Please check the MariaDB logs, after running shared command and service restart,

Code: Select all

[root@nodea mysql]# locate MariaDB-gssapi
[root@nodea mysql]# tail -50 /var/log/mariadb/mariadb.log
2017-06-22 21:00:19 140064959785728 [Note] Found 41 of 0 rows when repairing './nagiosql/tbl_lnkServiceToServicetemplate'
2017-06-22 21:00:19 140064959785728 [Note] Found 5 of 0 rows when repairing './nagiosql/tbl_lnkServiceToVariabledefinition'
2017-06-22 21:00:19 140064959785728 [Note] Found 1 of 0 rows when repairing './nagiosql/tbl_lnkServicetemplateToContactgroup'
2017-06-22 21:00:19 140064959785728 [Note] Found 81 of 0 rows when repairing './nagiosql/tbl_lnkServicetemplateToServicetemplate'
2017-06-22 21:00:19 140064959785728 [Note] Found 7 of 0 rows when repairing './nagiosql/tbl_mainmenu'
2017-06-22 21:00:19 140064959785728 [Note] Found 42 of 0 rows when repairing './nagiosql/tbl_service'
2017-06-22 21:00:19 140064959785728 [Note] Found 83 of 0 rows when repairing './nagiosql/tbl_servicetemplate'
2017-06-22 21:00:19 140064959785728 [Note] Found 12 of 0 rows when repairing './nagiosql/tbl_settings'
2017-06-22 21:00:19 140064959785728 [Note] Found 29 of 0 rows when repairing './nagiosql/tbl_submenu'
2017-06-22 21:00:19 140064959785728 [Note] Found 46 of 0 rows when repairing './nagiosql/tbl_timedefinition'
2017-06-22 21:00:19 140064959785728 [Note] Found 8 of 0 rows when repairing './nagiosql/tbl_timeperiod'
2017-06-22 21:00:19 140064959785728 [Note] Found 2 of 0 rows when repairing './nagiosql/tbl_user'
2017-06-22 21:00:19 140064959785728 [Note] Found 6 of 0 rows when repairing './nagiosql/tbl_variabledefinition'
2017-06-22 21:00:19 140064959785728 [Note] Found 112 of 0 rows when repairing './nagiosxi/xi_auditlog'
2017-06-22 21:00:19 140064959785728 [Note] Found 1 of 0 rows when repairing './nagiosxi/xi_commands'
2017-06-22 21:00:19 140064959785728 [Note] Found 40 of 0 rows when repairing './nagiosxi/xi_events'
2017-06-22 21:00:19 140064959785728 [Note] Found 49 of 0 rows when repairing './nagiosxi/xi_meta'
2017-06-22 21:00:19 140064959785728 [Note] Found 127 of 0 rows when repairing './nagiosxi/xi_options'
2017-06-22 21:00:19 140064959785728 [Note] Found 17 of 0 rows when repairing './nagiosxi/xi_sysstat'
2017-06-22 21:00:19 140064959785728 [Note] Found 49 of 0 rows when repairing './nagiosxi/xi_usermeta'
2017-06-22 21:00:19 140064959785728 [Note] Found 2 of 0 rows when repairing './nagiosxi/xi_users'
2017-06-22 21:01:15 140064859998976 [Note] /usr/libexec/mysqld: Normal shutdown

2017-06-22 21:01:15 140064859998976 [Note] Event Scheduler: Purging the queue. 0 events
2017-06-22 21:01:15 140064143156992 [Note] InnoDB: FTS optimize thread exiting.
2017-06-22 21:01:15 140064859998976 [Note] InnoDB: Starting shutdown...
2017-06-22 21:01:17 140064859998976 [Note] InnoDB: Shutdown completed; log sequence number 1680287
2017-06-22 21:01:17 140064859998976 [Note] /usr/libexec/mysqld: Shutdown complete

2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: The InnoDB memory heap is disabled
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Compressed tables use zlib 1.2.7
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Using Linux native AIO
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Using generic crc32 instructions
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Completed initialization of buffer pool
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: 128 rollback segment(s) are active.
2017-06-22 21:01:17 140289092069504 [Note] InnoDB: Waiting for purge to start
2017-06-22 21:01:18 140289092069504 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 1680287
2017-06-22 21:01:18 140288295155456 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-06-22 21:01:18 140289092069504 [Note] Plugin 'FEEDBACK' is disabled.
2017-06-22 21:01:18 140289092069504 [Warning] GSSAPI plugin : default principal 'mariadb/nodea.techmahindra.com@' not found in keytab
2017-06-22 21:01:18 140289092069504 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.  Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
2017-06-22 21:01:18 140289092069504 [ERROR] Plugin 'gssapi' init function returned error.
2017-06-22 21:01:18 140289092069504 [Note] Server socket created on IP: '::'.
2017-06-22 21:01:18 140289092069504 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.17-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
You have mail in /var/spool/mail/root
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Databse Error

Post by tgriep »

It looks like the repair ran and that the database restarted OK.
The GSSAPI message is from an unused module on your system that can be removed by following these instructions.
https://dba.stackexchange.com/questions ... api-plugin
That error should not affect the Nagios process.

Can you login to the Web interface now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Databse Error

Post by sandeepatil »

Not able to login with web interface.

Same "Data Error" facing as earlier shared.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Databse Error

Post by mcapra »

I wonder if MariaDB is binding to IPv6 addresses exclusively and Nagios XI is attempting IPv4:

Code: Select all

2017-06-22 21:01:18 140289092069504 [Note] Server socket created on IP: '::'.
I don't recall all the conditions that make the general "Database Error" message appear, but I think a general lack of "connect-ability" might be one of them.
Former Nagios employee
https://www.mcapra.com/
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Databse Error

Post by tgriep »

Can you post the following files from the Nagios server?

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
/etc/my.cnf
Also post all of the files in the following folder

Code: Select all

/etc/my.cnf.d
Then run the following commands as root and post the /tmp/info.txt file.

Code: Select all

ps -ef --cols=300 >/tmp/info.txt
grep ndo2db /var/log/messages >>/tmp/info.txt
grep ndo2db /usr/local/nagios/var/nagios.log >>/tmp/info.txt
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Databse Error

Post by sandeepatil »

Details : "/usr/local/nagiosxi/html/config.inc.php"

Code: Select all

[root@nodea ~]# cat /usr/local/nagiosxi/html/config.inc.php
<?php
//
// Copyright (c) 2008-2016 Nagios Enterprises, LLC. All rights reserved.
//

// Base url
// - do not include http(s) or host name - this is the base from "http://localhost"
$cfg['base_url'] = "/nagiosxi";

// Base root directory where XI is installed
$cfg['root_dir'] = "/usr/local/nagiosxi";

// Directory where scripts are installed
$cfg['script_dir'] = "/usr/local/nagiosxi/scripts";

$cfg['xidpe_dir'] = '/usr/local/nagios/var/spool/xidpe/';
$cfg['perfdata_spool'] = '/usr/local/nagios/var/spool/perfdata/';

// Nom checkpoints
$cfg['nom_checkpoints_dir'] = "/usr/local/nagiosxi/nom/checkpoints/nagioscore/";

// Force http/https
$cfg['use_https'] = false; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP

// Allow for different http port for subsystem calls
$cfg['port_number'] = false;

// Default server, db, connection settings
$cfg['dbtype'] = ''; // this setting is no longer used - use settings below
$cfg['dbserver'] = 'localhost'; // this setting is no longer used - use settings below

// Database connection type
// 1 = persistent, 0 = normal
$cfg['db_conn_persistent'] = 1;

// DB-specific connection information
$cfg['db_info'] = array(
    "nagiosxi" => array(
        "dbtype" => 'mysql',
        "dbserver" => '',
        "user" => 'nagiosxi',
        "pwd" => 'n@gweb',
        "db" => 'nagiosxi',
        "dbmaint" => array( // variables affecting maintenance of db
            "max_auditlog_age" => 30, // max time (in DAYS) to keep audit log entries
            "max_commands_age" => 480, // max time (minutes) to keep commands
            "max_events_age" => 480, // max time (minutes) to keep events
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        ),
    ),
    "ndoutils" => array(
        "dbtype" => 'mysql',
        "dbserver" => 'localhost',
        "user" => 'ndoutils',
        "pwd" => 'n@gweb',
        "db" => 'nagios',
        "dbmaint" => array( // variables affecting maintenance of ndoutils db

            "max_externalcommands_age" => 7, // max time (in DAYS) to keep external commands
            "max_logentries_age" => 90, // max time (in DAYS) to keep log entries
            "max_statehistory_age" => 730, // max time (in DAYS) to keep state history information
            "max_notifications_age" => 90, // max time (in DAYS) to keep notifications
            "max_timedevents_age" => 5, // max time (minutes) to keep timed events
            "max_systemcommands_age" => 5, // max time (minutes) to keep system commands
            "max_servicechecks_age" => 5, // max time (minutes) to keep service checks
            "max_hostchecks_age" => 5, // max time (minutes) to keep host checks
            "max_eventhandlers_age" => 5, // max time (minutes) to keep event handlers
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        ),
    ),
    "nagiosql" => array(
        "dbtype" => 'mysql',
        "dbserver" => 'localhost',
        "user" => 'nagiosql',
        "pwd" => 'n@gweb',
        "db" => 'nagiosql',
        "dbmaint" => array( // variables affecting maintenance of db
            "max_logbook_age" => 480, // max time (minutes) to keep log book records
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        ),
    ),
);

// db-specific table prefixes
$cfg['db_prefix'] = array(
    "ndoutils" => "nagios_", // prefix for NDOUtils tables
    "nagiosxi" => "xi_", // prefix for XI tables
    "nagiosql" => "tbl_", // prefix for NagiosQL tables
);

// component info
$cfg['component_info'] = array(
    "nagioscore" => array(
        "cgi_dir" => "/usr/local/nagios/sbin",
        "import_dir" => "/usr/local/nagios/etc/import",
        "plugin_dir" => "/usr/local/nagios/libexec",
        "cgi_config_file" => "/usr/local/nagios/etc/cgi.cfg",
        "cmd_file" => "/usr/local/nagios/var/rw/nagios.cmd",
        "log_file" => "/usr/local/nagios/var/nagios.log",
        "nom_checkpoint_interval" => 1440, // time (in minutes) between nom checkpoints
    ),
    "pnp" => array(
        "perfdata_dir" => "/usr/local/nagios/share/perfdata",
        "share_dir" => "/usr/local/nagios/share/pnp",
        "direct_url" => "/nagios/pnp",
        "username" => 'nagiosxi', // don't change this!
        "password" => 'nagiosadmin', // this gets reset when security credentials are reset after installation
    ),
    "perfdata" => array(
        "rrdtool_path" => "/usr/bin/rrdtool",
    ),
    "nagiosql" => array(
        "dir" => "/var/www/html/nagiosql",
        "direct_url" => "/nagiosql",
        "username" => 'nagiosxi', // don't change this!
        "password" => 'n@gweb', // this gets reset when security credentials are reset after installation
    ),
    "nagvis" => array(
        "share_dir" => "/usr/local/nagios/share/nagvis",
        "direct_url" => "/nagios/nagvis",
        "username" => 'nagiosadmin', // don't change this!
        "password" => 'nagiosadmin', // this gets reset when security credentials are reset after installation
    ),
);

$cfg['demo_mode'] = false; // is this in demo mode

$cfg['dashlet_refresh_multiplier'] = 1000; // milliseconds (1 second = 1000)

// REFRESH RATES FOR VARIOUS DASHLETS (IN SECONDS UNLESS THE MULTIPLIER IS CHANGED)
$cfg['dashlet_refresh_rates'] = array(
    "available_updates" => 24 * 60 * 60, // 24 hours
    "systat_eventqueuechart" => 5,
    "sysstat_monitoringstats" => 30,
    "systat_monitoringperf" => 30,
    "sysstat_monitoringproc" => 30,
    "perfdata_chart" => 60, // performance graphs
    "network_outages" => 30,
    "host_status_summary" => 60,
    "service_status_summary" => 60,
    "hostgroup_status_overview" => 60,
    "hostgroup_status_grid" => 60,
    "servicegroup_status_overview" => 60,
    "servicegroup_status_grid" => 60,
    "hostgroup_status_summary" => 60,
    "servicegroup_status_summary" => 60,
    "sysstat_componentstates" => 7,
    "sysstat_serverstats" => 5,
    "network_outages_summary" => 30,
    "network_health" => 30,
    "host_status_tac_summary" => 30,
    "service_status_tac_summary" => 30,
    "feature_status_tac_summary" => 30,
    "admin_tasks" => 60,
    "getting_started" => 60,
    "pagetop_alert_content" => 30, // not a dashlet yet, sits in page header
    "tray_alert" => 30, // sites in page footer
);


// MEMCACHED SETUP
$cfg['memcached_enable'] = false; // should we use memcached or not?
$cfg['memcached_hosts'] = array('127.0.0.1', '192.168.1.3'); // one or more memcached servers
$cfg['memcached_port'] = 11211; // default memcached port
$cfg['memcached_compress'] = false; // use true to store items compressed
$cfg['memcached_ttl'] = 10; // max number of seconds data (from SELECT statements) should be cached


// HTTP BASIC AUTHENTICATION INFO -- USED BY SUBSYSTEM
$cfg['use_basic_authentication'] = false; // is HTTP Basic authentication being used? if so, set the two variables below...
$cfg['subsystem_basic_auth_username'] = 'nagiosxi'; // subsystem credentials
$cfg['subsystem_basic_auth_password'] = 'somepassword';

$cfg['default_language'] = 'en_US'; // default language
$cfg['default_theme'] = ''; // default theme

// available languages
$cfg['languages'] = array(
    "en_US" => "English",
);

/*********   DO NOT MODIFY ANYTHING BELOW THIS LINE   **********/

$cfg['default_instance_id'] = 1; // default ndoutils instance to read from
$cfg['default_result_records'] = 100000; // max number of records to return by default

$cfg['online_help_url'] = "https://support.nagios.com/"; // comment this out to disable online help links
$cfg['feedback_url'] = "https://api.nagios.com/feedback/";
$cfg['privacy_policy_url'] = "https://www.nagios.com/legal/privacypolicy/";

//$cfg['db_version']=101;
$cfg['db_version'] = 113;
//$cfg['product_version']='2009RC1';

$cfg['subsystem_ticket'] = "12345"; // default - this gets reset...

$cfg['htaccess_file'] = "/usr/local/nagiosxi/etc/htpasswd.users";
$cfg['htpasswd_path'] = "/usr/bin/htpasswd";

$cfg['enable_analytics'] = 1;

// Secure notification %responseurl%
// setting this to 1 will force users to login in the response URL
// $cfg['secure_response_url']=1;

// Globally disable in page help system
// $cfg['disable_helpsystem']=1;

///////// keep these in order /////////

if (!defined('CFG_ONLY')) {

// include generic db defs
if (!defined('CFG_ONLY')) { require_once(dirname(__FILE__) . '/includes/db.inc.php'); }

// include generic  definitions
if (!defined('CFG_ONLY')) { require_once(dirname(__FILE__) . '/db/common.inc.php'); }

}

Details : "/etc/my.cnf"

Code: Select all

[root@nodea ~]# cat /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# This group is read by the server
#
[mysqld]
query_cache_size=16M
query_cache_limit=4M
tmp_table_size=64M
max_heap_table_size=64M
key_buffer_size=32M
table_open_cache=32

query_cache_size=16M
query_cache_limit=4M
tmp_table_size=64M
max_heap_table_size=64M
key_buffer_size=32M
table_open_cache=32

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[root@nodea ~]#
Details : "/etc/my.cnf.d"

File : auth_gssapi.cnf

Code: Select all

[root@nodea my.cnf.d]# cat auth_gssapi.cnf
[mariadb]
plugin-load-add=auth_gssapi.so
[root@nodea my.cnf.d]#
File : client.cnf

Code: Select all

[root@nodea my.cnf.d]# cat client.cnf
#
# These two groups are read by the client library
# Use it for options that affect all clients, but not the server
#


[client]

# This group is not read by mysql client library,
# If you use the same .cnf file for MySQL and MariaDB,
# use it for MariaDB-only client options
[client-mariadb]
File : enable_encryption.preset

Code: Select all

[root@nodea my.cnf.d]# cat enable_encryption.preset
#
# !include this file into your my.cnf (or any of *.cnf files in /etc/my.cnf.d)
# and it will enable data at rest encryption. This is a simple way to
# ensure that everything that can be encrypted will be and your
# data will not leak unencrypted.
#
# DO NOT EDIT THIS FILE! On MariaDB upgrades it might be replaced with a
# newer version and your edits will be lost. Instead, add your edits
# to the .cnf file after the !include directive.
#
# NOTE that you also need to install an encryption plugin for the encryption
# to work. See https://mariadb.com/kb/en/mariadb/data-at-rest-encryption/#encryption-key-management
#
[mariadb]
aria-encrypt-tables
encrypt-binlog
encrypt-tmp-disk-tables
encrypt-tmp-files
loose-innodb-encrypt-log
loose-innodb-encrypt-tables
[root@nodea my.cnf.d]#
File : mariadb-server.cnf

Code: Select all

[root@nodea my.cnf.d]# cat mariadb-server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid


#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0

# this is only for embedded server
[embedded]

# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]

[root@nodea my.cnf.d]#
File : mysql-clients.cnf

Code: Select all

[root@nodea my.cnf.d]# cat mysql-clients.cnf
#
# These groups are read by MariaDB command-line tools
# Use it for options that affect only one utility
#

[mysql]

[mysql_upgrade]

[mysqladmin]

[mysqlbinlog]

[mysqlcheck]

[mysqldump]

[mysqlimport]

[mysqlshow]

[mysqlslap]

[root@nodea my.cnf.d]#
File : tokudb.cnf

Code: Select all

[root@nodea my.cnf.d]# cat tokudb.cnf
[mariadb]
# See https://mariadb.com/kb/en/how-to-enable-tokudb-in-mariadb/
# for instructions how to enable TokuDB
#
# See https://mariadb.com/kb/en/tokudb-differences/ for differences
# between TokuDB in MariaDB and TokuDB from http://www.tokutek.com/

#plugin-load-add=ha_tokudb.so

[root@nodea my.cnf.d]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Databse Error

Post by tgriep »

Try removing the following files from the /etc/my.cnf.d folder

Code: Select all

auth_gssapi.cnf
enable_encryption.preset
tokudb.cnf
Then restart mariadb by running

Code: Select all

systemctl restart mariadb
See if you can login to the XI GUI, if not, I would need to get this information.
Run the following commands as root and post the /tmp/info.txt file.

Code: Select all

ps -ef --cols=300 >/tmp/info.txt
grep ndo2db /var/log/messages >>/tmp/info.txt
grep ndo2db /usr/local/nagios/var/nagios.log >>/tmp/info.txt
Be sure to check out our Knowledgebase for helpful articles and solutions!
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: Databse Error

Post by sandeepatil »

Out put file size 10 MB, trying to upload.
Locked