I call a Java program in Nagios to test if my database is responding. It is required to test the JDBC connection. The Java program accepts four command line arguments: user, password, hostname, and database.
JdbcThinCheckup mike mike xxx.xx.xx.xxx niku
Added a new service to Nagios to check a database and was getting the error below.
Error: Io exception: Connection refused (DESCRIPTION=(TMP=)(VSNNUM=153094144)(ERR=12505)
Turns out I was using the alias “nikuprod” found in the tnsnames.ora file rather than the database name “niku”. JDBC doesn’t utilize the tnsnames.ora file. Not sure why that didn’t occur to me yesterday. Brain fart maybe?
(SERVICE_NAME = NIKU)
Wasted some time trying to resolve this error by not paying attention. At least I’ll be able to refer back to my blog entry when this happens again a year from now.