• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

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

Views

249

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

I get the error:

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

An addition to my last post:

  • Download location for the Oracle JDBC driver corresponding to your Oracle version;
  • After you've implemented the Jar file and restarted ColdFusion, create the datasource using "Other" as driver type, not "Oracle". This means there will be no need to enter the Service Name.
  • Driver class: oracle.jdbc.OracleDriver
  • Driver name(optional): ojdbc.jar
  • Use one of the formats for JDBC URL Test the following examples to see which one works:
    JDBC URL: jdbc:oracle:thin:@myOracleDBhost:1521/myOracleSID

    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=__jdbc__)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=tstdb))

    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=__jdbc__)(PORT=49816)) (CONNECT_DATA=(SERVICE_NAME=tstdb))

    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=10.10.xxx.xx)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=tstdb))

    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=10.10.xxx.xx)(PORT=49816)) (CONNECT_DATA=(SERVICE_NAME=tstdb))


    Note: I assume the host-name and service name of the database to be __jdbc__ and tstdb..
              You should test by interchanging between the default port 1521 and 49816.
              You should fill in the placeholders in the IP 10.10.xxx.xx

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Before doing all that, I hope you both (and all readers) will see the seemingly far simpler solution I offered as another reply yesterday. In this threaded interface, it's appearing (currently) at the bottom of this page, not within this thread of responses to bkbk's first reply. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Version details

    Oracle is ver 19

    Coldfusion 2023 Update 11

 

I will download the oracle jdbc driver and see how that works per you notes.

 

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

@SajanM , I am assuming that you will, first and foremost, aim to use your usual datasource configuration method. So I take it for granted that you will first follow Charlie's suggestion.

Try the other suggestions only if it doesn't help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

CF2023 is at version 11 (updated via Admin console)

Oracle version is 19

 

I will check the update technote.

 

Thanks

Sajan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

LATEST

Yep, so you should find that this is resolved by simply a) stopping cf, b) deleting the cfusion/bin/felix-cache, then c) starting cf and testing of your datasource now works. We look forward to confirmation of success or failure.

 

And if it works, the big lesson (for all) to take away is the importance of reading the update technotes. Yes, it's like flossing. 🙂 I'll add that I also do a blog post on each update when they come out, where I highlight things that folks should pay attention to. More at carehart.org/blog (including a simple signup form to get notified of new posts). 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation