Coldfusion with PostgreSQL – Timeout issue when setting up CF Data source
Upon trying to connect to a remote POSTGRESQL database server — which I can both PING fine and connect to using the Windows POSTGRESQL odbc 32 bit drivers —
you get this error
Connection verification failed for data source: mytest_post
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection
==
Here is the easy fix. (presumtion of CF 10)
- make sure you apply the most current CF hotfix
- easy process – read this blog post
- for an “out-of-the-box” setup, (noting that CF 10 is running on JRE 6.x), download the JDBC driver version 4.0 (which is for JRE 6.x) here
- put that JAR file in the following directory
- C:\ColdFusion10\cfusion\lib
- remove the old POSTGRESQL JAR file postgresql-9.3-1101.jdbc41.jar
- restart the CF services
- Go setup the postgreSQL connection and verify it. Should now give you an “OK”
This was a NIGHTMARE to sort out. I am hoping this can help someone!