check_mssql_health icon indicating copy to clipboard operation
check_mssql_health copied to clipboard

Unable to connect when not utilizing freetds.conf for connection information

Open fmikker opened this issue 8 years ago • 1 comments

When trying to use the plugin without specifying the connection information in /etc/freetds.conf and using the flags "--hostname" and "--port" instead to remove the dependency on the configuration file, the plugin fails to connect to the database server.

Microsoft SQL Server 2012 CentOS release 6.7 (Final) freetds-0.91-2.el6.x86_64 check_mssql_health (1.6.2.3)

The below error is displayed: ./check_mssql_health --hostname ref-sql-03.local --port 1433 --username "DEV\mon" --password "666-passWOR-D" -m database-online --name msdb CRITICAL - cannot connect to ref-sql-03.local. DBI connect(';host=ref-sql-03.local;port=1433','DEV\mon',...) 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 /opt/plugins/check_mssql_health line 3273

The error message reports that the server name isn't found in configuration files, but that exactly what I want to avoid.

fmikker avatar Mar 14 '16 16:03 fmikker

This looks very similar to #10 a comment in that issue refers to a commit in FreeTDS that seems to fix the problem. I have not verified that it does though but looks like it might.

rhagman avatar Jun 07 '16 07:06 rhagman