Sql connnection issue
Sql connnection issue
Hello,
I'm seeing the following error in the messages.log
Apr 21 14:14:30 cordmon1 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_programstatus SET instance_id='1', status_update_time=FROM_UNIXTIME(1398107670), program_start_time=FROM_UNIXTIME(1398107610), is_currently_running='1', process_id='14724', daemon_mode='1', last_command_check=FROM_UNIXTIME(1398107669), last_log_rotation=FROM_UNIXTIME(0), notifications_enabled='1', active_service_checks_enabled='1', passive_service_checks_enabled='1', active_host_checks_enabled='1', passive_host_checks_enabled='1', event_handlers_enabled='1', flap_detection_enabled='1', failure_prediction_enabled='1', process_performance_data='1', obsess_over_hosts='0', obsess_over_services='0', modified_host_attributes='0', modified_service_attributes='0', global_host_event_handler='xi_host_event_handler', global_service_event_handler='xi_service_event_handler' ON DUPLICATE KEY UPDATE instance_id='1', status_update_time=FROM_UNIXTIME(1398107670), program_start_time=FROM_UNIXTIME(1398107610), is_currently_running='1', process_id=
Apr 21 14:14:30 cordmon1 ndo2db: mysql_error: 'MySQL server has gone away'
Apr 21 14:14:30 cordmon1 ndo2db: Error: Connection to MySQL database has been lost!
Apr 21 14:14:30 cordmon1 ndo2db: Error: Could not connect to MySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Apr 21 14:14:30 cordmon1 last message repeated 24 times
Apr 21 14:14:48 cordmon1 nagios: Caught SIGTERM, shutting down...
Apr 21 14:14:48 cordmon1 nagios: Successfully shutdown... (PID=14724)
Please advise.
Thanks.
I'm seeing the following error in the messages.log
Apr 21 14:14:30 cordmon1 ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_programstatus SET instance_id='1', status_update_time=FROM_UNIXTIME(1398107670), program_start_time=FROM_UNIXTIME(1398107610), is_currently_running='1', process_id='14724', daemon_mode='1', last_command_check=FROM_UNIXTIME(1398107669), last_log_rotation=FROM_UNIXTIME(0), notifications_enabled='1', active_service_checks_enabled='1', passive_service_checks_enabled='1', active_host_checks_enabled='1', passive_host_checks_enabled='1', event_handlers_enabled='1', flap_detection_enabled='1', failure_prediction_enabled='1', process_performance_data='1', obsess_over_hosts='0', obsess_over_services='0', modified_host_attributes='0', modified_service_attributes='0', global_host_event_handler='xi_host_event_handler', global_service_event_handler='xi_service_event_handler' ON DUPLICATE KEY UPDATE instance_id='1', status_update_time=FROM_UNIXTIME(1398107670), program_start_time=FROM_UNIXTIME(1398107610), is_currently_running='1', process_id=
Apr 21 14:14:30 cordmon1 ndo2db: mysql_error: 'MySQL server has gone away'
Apr 21 14:14:30 cordmon1 ndo2db: Error: Connection to MySQL database has been lost!
Apr 21 14:14:30 cordmon1 ndo2db: Error: Could not connect to MySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Apr 21 14:14:30 cordmon1 last message repeated 24 times
Apr 21 14:14:48 cordmon1 nagios: Caught SIGTERM, shutting down...
Apr 21 14:14:48 cordmon1 nagios: Successfully shutdown... (PID=14724)
Please advise.
Thanks.
Re: Sql connnection issue
Here's my setup info:
Nagios XI 2012R2.1
Cent OS 6 32 bit
Virtual Server
Thanks.
Nagios XI 2012R2.1
Cent OS 6 32 bit
Virtual Server
Thanks.
Re: Sql connnection issue
Let's see if mysqld is even running:
If it is not, run the following:
If that command gives any output, post it here.
In addition, let's check out your mysql log. Run this:
and post the output here.
Code: Select all
service mysqld statusCode: Select all
service mysqld startIn addition, let's check out your mysql log. Run this:
Code: Select all
tail -20 /var/log/mysqld.logFormer Nagios employee
Re: Sql connnection issue
140421 16:00:50 mysqld started
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:51 InnoDB: Started; log sequence number 0 43655
140421 16:00:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:51 InnoDB: Started; log sequence number 0 43655
140421 16:00:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
Re: Sql connnection issue
FYI.
I just upgraded to xi 2012r2.9 to try to fix this issue but didn't worked.
I just upgraded to xi 2012r2.9 to try to fix this issue but didn't worked.
Re: Sql connnection issue
Which logs do you need?
Re: Sql connnection issue
That one.tmcdonald wrote:In addition, let's check out your mysql log. Run this:
and post the output here.Code: Select all
tail -20 /var/log/mysqld.log
Former Nagios employee
Re: Sql connnection issue
140421 15:55:44 mysqld started
140421 15:55:44 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 15:55:44 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 15:55:44 InnoDB: Started; log sequence number 0 43655
140421 15:55:44 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
140421 15:59:35 [Note] /usr/libexec/mysqld: Normal shutdown
140421 15:59:37 InnoDB: Starting shutdown...
140421 15:59:37 InnoDB: Shutdown completed; log sequence number 0 43655
140421 15:59:37 [Note] /usr/libexec/mysqld: Shutdown complete
140421 15:59:37 mysqld ended
140421 16:00:50 mysqld started
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:51 InnoDB: Started; log sequence number 0 43655
140421 16:00:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
140421 15:55:44 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 15:55:44 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 15:55:44 InnoDB: Started; log sequence number 0 43655
140421 15:55:44 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
140421 15:59:35 [Note] /usr/libexec/mysqld: Normal shutdown
140421 15:59:37 InnoDB: Starting shutdown...
140421 15:59:37 InnoDB: Shutdown completed; log sequence number 0 43655
140421 15:59:37 [Note] /usr/libexec/mysqld: Shutdown complete
140421 15:59:37 mysqld ended
140421 16:00:50 mysqld started
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:50 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
140421 16:00:51 InnoDB: Started; log sequence number 0 43655
140421 16:00:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
Re: Sql connnection issue
Everything was working yesterday as of 4:430 CST. After looking into the log this morning, at 5pm yesterday, Nagios was showing that everything was down even though they are not. The message below appeared before everything Nagios started sending the false notifications again.
Apr 21 17:05:27 [nogios_host} nagios: Auto-save of retention data completed successfully.
Thanks.
Apr 21 17:05:27 [nogios_host} nagios: Auto-save of retention data completed successfully.
Thanks.