Page 1 of 3
DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 1:04 pm
by dlukinski
DB-Lib error message 20009, severity 9 error after using SQL DB instance monitoring wizard to configure dozen of instance checks.
It there a way to test what exactly is wrong with accessing SQL instance? (read some of the older cases, but errors were not same)
Re: DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 1:32 pm
by rkennedy
Can you try running the following commands and output the result + /tmp/freetds.log?
Code: Select all
export TDSDUMP=/tmp/freetds.log
tsql -H myip -p 1433 -U myuser
(replace myip / myuser as needed, and enter the password when prompted)
Re: DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 2:01 pm
by dlukinski
rkennedy wrote:Can you try running the following commands and output the result + /tmp/freetds.log?
Code: Select all
export TDSDUMP=/tmp/freetds.log
tsql -H myip -p 1433 -U myuser
(replace myip / myuser as needed, and enter the password when prompted)
Here are the results:
# tsql -H 10.z.z.z -p 1438 -U 'XXX\yyyyyyyy'
Password:
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
Re: DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 2:24 pm
by scottwilkerson
Connection REQUIRES sqlserver account, and will not work with a windows user account
Re: DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 2:49 pm
by dlukinski
scottwilkerson wrote:Connection REQUIRES sqlserver account, and will not work with a windows user account
Ah-a / did not realize that.
Let me try in coming days, please keep this ticket open if possible
Thank you
Re: DB-Lib error message 20009, severity 9
Posted: Fri Nov 13, 2015 2:54 pm
by hsmith
We can leave this open for now, but please do not reply until you have additional information. We use a dashboard here at Nagios, and if an employee has not responded to something it shows up. There's currently not a way to differentiate between "pending" and "needs help"(that I am aware of:)). Let us know when you have more information.
Thanks!
Re: DB-Lib error message 20009, severity 9
Posted: Wed Nov 18, 2015 4:06 pm
by dlukinski
hsmith wrote:We can leave this open for now, but please do not reply until you have additional information. We use a dashboard here at Nagios, and if an employee has not responded to something it shows up. There's currently not a way to differentiate between "pending" and "needs help"(that I am aware of:)). Let us know when you have more information.
Thanks!
We've changes to local SQL authentication, but no luck still:
Unable to connect: Adaptive Server is unavailable or does not exist
Net-Lib error during Connection refused Error 111 - Connection refused
Re: DB-Lib error message 20009, severity 9
Posted: Wed Nov 18, 2015 4:22 pm
by rkennedy
Does the Nagios server IP have permission to access SQL?
Does port 1433 appearopen?
Re: DB-Lib error message 20009, severity 9
Posted: Thu Nov 19, 2015 9:21 am
by dlukinski
rkennedy wrote:Does the Nagios server IP have permission to access SQL?
Does port 1433 appearopen?
Actually this would be 1438 (in that case).
I specified instance instead, maybe it is trying to find instance on the default port and failing?
- how could I change that?
Re: DB-Lib error message 20009, severity 9
Posted: Thu Nov 19, 2015 1:49 pm
by lmiltchev
Can you show us the actual command that you are running from the command line along with the output of it? Hide sensitive info.
Example:
Code: Select all
/usr/local/nagios/libexec/check_mssql_server.py -H x.x.x.x -U 'username' -P 'password' -I 'instancename' --time2connect --warning 1 --critical 5
OK: Time to connect was 0.00740003585815s|time=0.00740003585815s;1;5;;
You can use either port or an instance name but not both. Also, check the permissions of your user. I believe, the user needs server level permissions of "Connect SQL" and "View server state." Also needs database level permissions of "Connect" and "Select". To check these permissions, the user have to log in the MSSQL server, and run the following queries:
Code: Select all
SELECT * FROM fn_my_permissions(null, 'DATABASE')
SELECT * FROM fn_my_permissions(null, 'SERVER')