Page 2 of 2
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Mon Jan 02, 2012 2:54 am
by softcon
I can connect with tsql, but I can't with check_mssql_health
Code: Select all
# tsql -H 192.168.0.252 -p 1854 -U <user> -P <pass>
locale is "hu_HU.UTF-8"
locale charset is "UTF-8"
1> select name from master.dbo.sysdatabases;
2> go
name
master
tempdb
model
msdb
ESETRADB
(5 rows affected)
Code: Select all
#./check_mssql_health --hostname 192.168.0.252 --port 1854 --username <user> --password <pass> --mode list-databases
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 ./check_mssql_health line 2175
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Mon Jan 02, 2012 1:44 pm
by mguthrie
What distro of Linux and version are you running? Some of the mssql packages have changed in recent releases, is this a migrated install of XI? How did you go about the upgrade?
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Tue Jan 03, 2012 4:13 am
by softcon
What distro of Linux and version are you running?
x64
Code: Select all
# cat /proc/version
Linux version 2.6.18-274.12.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Tue Nov 29 13:37:46 EST 2011
# cat /etc/redhat-release
CentOS release 5.7 (Final)
How did you go about the upgrade?
"Yum update" or "yum upgrade" never mind! Both of that made corrupt something for "check_mssql_health".
..is this a migrated install of XI?
I don't understand, what do you think.

I've installed XI from source and upgrade it regularly.
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Tue Jan 03, 2012 12:43 pm
by mguthrie
That plugin requires the perl DBD Sybase package, can you check to make sure that is still installed.
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Wed Jan 04, 2012 1:50 am
by softcon
Code: Select all
# yum list installed | grep DBD
perl-DBD-MySQL.x86_64 3.0007-2.el5 installed
perl-DBD-ODBC.x86_64 1.23-1.el5.rf installed
perl-DBD-Sybase.x86_64 1.10-1.el5.rf installed
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Wed Jan 04, 2012 11:59 am
by nscott
Do you have your /etc/freetds.conf configured at all? If you don't I assume you didn't have to do it in the past. However, I was reading the plugins comments and found this one:
Code: Select all
I can’t succeed in using this plugin. I have this error :
[root@helios libexec]# ./check_mssql_health –hostname CPTA-PROD-SQL –mode connection-time –username=SA –password=CPTAPROD CRITICAL – cannot connect to CPTA-PROD-SQL. DBI connect(‘;host=CPTA-PROD-SQL;port=1433′,’SA’,…) failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (78) NUMBER = (41) Server , database Message String: Server is unavailable or does not exist.
Which looks very similar to what you're getting. This is the response from the developer:
Code: Select all
Configure /etc/freetds.conf and try it with –server. Also try tsql.
So a direct fix would be configuring the freetds.conf. However, and the reason you're asking is why it was messed up after the upgrade. It might be some dependency was moved in the Perl dependencies. Perhaps the upgrade moved some of the perl modules or config files around which is what has it looking for the freetds.conf now.
Re: Upgrade linux & can't connect MS-SQL anymore
Posted: Fri Jan 06, 2012 3:12 am
by softcon
nscott wrote:
Code: Select all
Configure /etc/freetds.conf and try it with –server. Also try tsql.
It works, thanks!