Recently we had to restart our database server (yes, a production one), and one of the Tomcats didn't reconnect to the JNDI resources.
This is our JNDI resource definition:
<Resource name="jdbc/postgres" auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://10.1.0.104:5432/db"
username="******" password="*****"
maxTotal="30" maxIdle="5" maxWaitMillis="10000"
logAbandoned="true" removeAbandonedOnBorrow="true"
removeAbandonedOnMaintenance="true"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
validationQueryTimeout="5" validationQuery="select 1"
testOnBorrow="true" />
Software versions:
- Debian GNU/Linux 8.2 (jessie)
- Apache Tomcat/8.0.14
- OpenJDK 1.7.0_91-b02
- PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit
What could be wrong? Why it didn't reconnect automatically?
PS: This maybe is a cross forum question dba vs stackoverflow, but as it involves both side don't know actually where to ask it.