Page 1 of 2

Upgrade linux & can't connect MS-SQL anymore

Posted: Wed Nov 30, 2011 5:49 am
by softcon
Hi!

I've upgrade the Nagios server's virtual machine with "yum upgrade".
After restart I've got the following errors (because we have lot of MS-SQL servers):

Code: Select all

CRITICAL - cannot connect to 192.168.0.252. DBI connect(':host=192.168.0.252:port=1854','nagioscheck',...) failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (44)
Server , database
Message String: Server name not found in configuration files.
OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (45)
Server , database
Message String: Unknown host machine name.
at /usr/local/nagios/libexec/check_mssql_health line 2175
Any idea?

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Wed Nov 30, 2011 10:58 am
by yancy
softcon,

can you post the package versions of mysql that are now installed

#rpm -qa | grep mysql

also post:

cat /var/log/mysqld.log | tail

just curios why opted to use "yum upgrade" instead of "yum update"?

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Thu Dec 01, 2011 2:20 am
by softcon
Currently (i've restored from a working backup):

Code: Select all

# rpm -qa | grep mysql
mysql-devel-5.0.77-4.el5_6.6
mysql-connector-odbc-3.51.26r1127-1.el5
mysql-5.0.77-4.el5_6.6
mysql-server-5.0.77-4.el5_6.6
php-mysql-5.1.6-27.el5_5.3
libdbi-dbd-mysql-0.8.1a-1.2.2

Code: Select all

# cat /var/log/mysqld.log | tail
111130 12:42:10 [ERROR] Got error 127 when reading table './nagios/nagios_servicestatus'
111130 12:42:14 [ERROR] Got error 127 when reading table './nagios/nagios_servicestatus'
111130 12:42:14 [ERROR] Got error 127 when reading table './nagios/nagios_servicestatus'
111130 12:42:14 [ERROR] Got error 127 when reading table './nagios/nagios_servicestatus'
111130 12:42:18 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hostchecks.MYI'; try to repair it
111130 12:45:02 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './nagios/nagios_hostchecks.MYI'; try to repair it
111201 08:14:06  mysqld started
111201  8:14:06  InnoDB: Started; log sequence number 0 6104901
111201  8:14:06 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
just curios why opted to use "yum upgrade" instead of "yum update"?
Because I'm not Linux guru and I know well Debian distributition than CentOS.

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Thu Dec 01, 2011 11:11 am
by yancy
hi Softcon,

I'm glad to hear you were able to restore from backup. if you want to keep up with the latest release maintenance packages (security updates, etc..), I recommend using 'yum update'. 'yum upgrade' is used for upgrading to a newer distribution release, which can cause some major headaches.

Let us know if you have any other questions.

-Yancy

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Mon Dec 05, 2011 7:25 am
by softcon
I've used yum update.
Nothing change, again error. :(

Code: Select all

# rpm -qa | grep mysql
mysql-devel-5.0.77-4.el5_6.6
mysql-connector-odbc-3.51.26r1127-1.el5
mysql-5.0.77-4.el5_6.6
mysql-server-5.0.77-4.el5_6.6
php-mysql-5.1.6-27.el5_5.3
libdbi-dbd-mysql-0.8.1a-1.2.2

Code: Select all

# cat /var/log/mysqld.log | tail
111205 13:16:32  InnoDB: Starting shutdown...
111205 13:16:33  InnoDB: Shutdown completed; log sequence number 0 6104901
111205 13:16:33 [Note] /usr/libexec/mysqld: Shutdown complete

111205 13:16:33  mysqld ended

111205 13:19:59  mysqld started
111205 13:20:00  InnoDB: Started; log sequence number 0 6104901
111205 13:20:00 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Mon Dec 05, 2011 10:23 am
by mguthrie
There were some package updates with the php-mssql package in more recent versions of CentOS. What is your current distro information and version that you're running?

Can you show us the output from the following?

Code: Select all

yum list installed | grep mssql

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Tue Dec 06, 2011 1:48 am
by softcon
I've restored to working copy again:

Code: Select all

# yum list installed | grep mssql
php-mssql.x86_64                         5.1.6-15.el5.centos.1         installed

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Tue Dec 06, 2011 10:48 am
by mguthrie
Ok, so bear with me for a second, I'd like to make sure we're talking about the same thing. Is the issue with MS-SQL (Microsoft SQL Server), or MYSQL? Both are referenced in this thread and I'd like to make sure we're troubleshooting the right issue...

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Wed Dec 07, 2011 1:57 am
by softcon
MS-SQL server

Re: Upgrade linux & can't connect MS-SQL anymore

Posted: Wed Dec 07, 2011 12:15 pm
by nscott
Softcon,

the check_mssql_health is a mix of C and Perl. From your post:

Code: Select all

Message String: Server name not found in configuration files.
Do you have some text files that you had to configure for DBI to connect to your MSSQL server? Files that contain connection info and credentials? Those are referenced by Perl and Perl may have been updated during the "yum upgrade" causing the files to be inacessible to the Perl upgrade.