Forum Stats

  • 3,780,580 Users
  • 2,254,411 Discussions
  • 7,879,386 Comments

Discussions

ORDS with TNS - error when trying to connect DB for APEX

13

Answers

  • alacourb
    alacourb Member Posts: 15 Blue Ribbon
    edited Nov 9, 2021 11:00AM

    I have tried to use CustomURL instead of TNS for ORDS connection type and it worked.

    My setup is with Oracle JDK 11.0.13 running ORDS 21.3 in Standalone mode.

    URL format: jdbc:oracle:thin:@MY_TNS_ALIAS?TNS_ADMIN=D:\\Oracle\\tns\\admin

    User_Z4K9S this might be interesting for you and provide a workaround to your issue as well.

    By the way, it also seems to work with OpenJDK 17 and Tomcat 9, even though it's not officially supported.

  • User_Z4K9S
    User_Z4K9S Member Posts: 21 Blue Ribbon

    Thanks alacourb - so it seems like your test has proven that whatever change broke the handling of the TNS URL in Windows was something in the ORDS code itself and had nothing to do with the JDK.

    When I get some time I'll play around with this in my test environment and see if I'm able to upgrade to 21.3 using the CustomURL.

    Also I just noticed that 21.3.1 is out - doesn't say anything about TNS bug fixes in the changelog but I'll try upgrading to that first with TNS and see if maybe they found it and fixed it there.

    Just out of curiosity - did you open a SR with Oracle for this? There definitely seems to be a bug there that should be addressed, but I'm glad you found this workaround at least! Thanks!

  • alacourb
    alacourb Member Posts: 15 Blue Ribbon
    edited Nov 10, 2021 7:49AM

    User_Z4K9S yes I have open a SR for that issue.

    Please let me know if 21.3.1 is helping. Thanks.

  • alacourb
    alacourb Member Posts: 15 Blue Ribbon

    User_Z4K9S I have tested with ORDS 21.3.1 and result is the same.

    I'm not getting any progress on my SR as support keeps asking the same question without reading my input to the end and not checking the provided logs and screenshots.

  • Suresh-Sangaran-Oracle
    Suresh-Sangaran-Oracle Member Posts: 240 Employee

    SR number? Did you refer this community link to the SR.

  • Suresh-Sangaran-Oracle
    Suresh-Sangaran-Oracle Member Posts: 240 Employee
    edited Nov 17, 2021 1:50AM

    alacourb - I have found your SR, let me do the best to progress it. Suspecting the feature is broken and a Bug with 21.3.* and 21.2.*. It works for 20.4.* and lower. If this is not the case, let me know.

    Thanks, Suresh

    alacourb
  • Suresh-Sangaran-Oracle
    Suresh-Sangaran-Oracle Member Posts: 240 Employee
    Accepted Answer

    Followup Bug 33583853 - FAILED TO CONNECT TO USER: ORDS_PUBLIC_USER URL: JDBC:ORACLE:THIN:@MYDB?TNS_ADMIN

    alacourb
  • alacourb
    alacourb Member Posts: 15 Blue Ribbon

    Thank you very much Suresh-Sangaran-Oracle for the follow-up and the bug opening.

    I can confirm it isn't working starting with 21.2 upwards. 21.1 is still ok.

  • alacourb
    alacourb Member Posts: 15 Blue Ribbon

    User_Z4K9S I have tested with ORDS 21.4 and result is the same.

  • User_Z4K9S
    User_Z4K9S Member Posts: 21 Blue Ribbon

    Thanks for checking that alacourb - I've had other priorities of late so I've temporarily given up on upgrading ORDS and am just running on 21.1.3 in our test environments and 20.4.3 in production.

    I think the key to finding this bug is that the change happened somewhere between 21.1.3 and 21.2. Any changes to the code that handles the database connections and TNS that got modified between those two versions likely caused this bug.

    I tried using a Java decompiler to compare components of the two ords.war files from 21.1.3 and 21.2, but it's like looking for a needle in a haystack when you don't know exactly what you're looking for. I tried searching some of the Java classes that were throwing exceptions - there were changes to the Universal Connection Pool (ucp-21*.jar) between the two versions, but I couldn't pinpoint anything specific. The word "TNS" is present in several different files in ords.war, so trying to track it down would be time consuming even for someone who knew the codebase.

    Suresh-Sangaran-Oracle, is there a way for me to keep an eye on this bug myself and potentially contribute anything I find to it? I tried searching My Oracle Support for the bug numeric id as well as the text from the bug and came up with no results.