connector/j connection to db server via hostname?
"Anthony J. Biacco" <[email protected]> Tue, 3 Feb 2009 14:15:39 -0700
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <40D5E3C3CBE03D45A776E7C358BDE908E382D8@missoula.formatdynamics.com> |
I'm trying to put a hostname in my resource url for the jdbc driver, i.e. "mysql-cluster-backup-host:3307". This hostname is in my /etc/hosts file. When the driver tries to failover to this host, i get a "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.) " error. If i use the ip in the url, the connection works fine. 1. Can i use hostnames from /etc/hosts in the url? If so, what could be the reason connector/j might not be recognizing it? 2. Can i get information from the driver in my tomcat log that tells me exactly what host/ip the driver is attempting to connect to? Thanx, -Tony --------------------------- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 [email protected] http://www.formatdynamics.com -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]