Skip to main content
Inspiring
November 20, 2024
Answered

CF2023 java.sqI.SQLException: Timed out trying to establish connection

  • November 20, 2024
  • 2 replies
  • 2729 views

We had a new linux vm built (RHEL 9) and installed CF2023. We migrated the settings (.car file) from the existing CF2021 and trying to get it up and running. So far we are good with admin console and app folder migrations. But we could get the datasource connection working.

 

The issue we are seeing is when trying to verify an oracle datasource. (using macromedia.jd bc.oracle.OracleDnver)

        Connection verification failed for datasource:ptcltst
        java.sqI.SQLException: Timed out trying to establish connection

We have checked network connectivity between the cf 2023 server and the orace database on port 1521 and it successfull but it fails in the admin console with above error. There is nothing being recd at the target oracle db.

When we try the same connection from CF2021 server admin console, we are able to connect and oracle is able to recieve the connection info
20-NOV-2024 15:00:22 * (CONNECT_DATA=(SERVICE_NAME=tstdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=coldfusion))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.xxx.xx)(PORT=49816)) * establish *

Any help is greatly appreciated.

Thanks

Sajan

    Correct answer SajanM

    Hi @SajanM ,

    You asked the question originally. So has your problem been solved?


    Yes, it was a rhel linux vm issue related to network configuration

    getsebool -a | grep httpd
    You should see:

    httpd_can_network_connect --> on   

    (mine was set to off, turned it on and it was able to connect after that)

     

    Thanks

    2 replies

    Charlie Arehart
    Community Expert
    November 20, 2024

    Sajan, you don't clarify if you'd applied any updates after installing cf2023, but I'll assume you did--and specifically the latest, update 11 (from last month).

     

    And in the update technote for that is a know issues section (pointed out also at the top) warning of this problem and offering the solution (with more details in the first bullet above the one regarding oracle data sources).

     

    Let us know how that goes for you. 

    /Charlie (troubleshooter, carehart. org)
    SajanMAuthor
    Inspiring
    November 21, 2024

    CF2023 is at version 11 (updated via Admin console)

    Oracle version is 19

     

    I will check the update technote.

     

    Thanks

    Sajan

    Charlie Arehart
    Community Expert
    February 23, 2025

    I could access the DB using mysql workbench, so that was not the issue.


    The key question was whether you could do that at the same time cf could not--and presuming workbench was on the same machine as cf, and using the exact same connection info (server and port) as cf.

     

    But sure, if yes to all those, then we can let it go until/if the problem recurs. 🙂 

    /Charlie (troubleshooter, carehart. org)
    BKBK
    Community Expert
    November 20, 2024

    What happens when you use for CF 2023 the same user, service name, host IP (10.10.xxx.xx) and port (49816) that you used for CF 2021?

    SajanMAuthor
    Inspiring
    November 20, 2024

    I get the error:

     Connection verification failed for datasource:ptcltst
            java.sqI.SQLException: Timed out trying to establish connection

    BKBK
    Community Expert
    November 20, 2024

    What is the Oracle version? I ask because something might have changed in the implementation of Oracle between CF 2021 and CF 2023.

     

    For example, what about doing the following test. Download the Oracle JDBC driver (that is, the Jar file) that corresponds to your Oracle version. Place the file in ColdFusion 2023's lib directory. Then restart ColdFusion 2023.