Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection fails with 'Invalid Oracle URL specified' #111

Open
dev704 opened this Issue Nov 11, 2018 · 10 comments

Comments

Projects
None yet
3 participants
@dev704
Copy link

commented Nov 11, 2018

Hi
When running below, the connection fails. Is there a way to get more detailed debug information?
Running sqlplus with the same parameters connects correctly

C:\utPLSQL-cli\bin\utplsql run test/test_pwd@//server1.com:1521/service1
jdbc:oracle:oci8:****/****@//test/test_pwd@//server1.com:1521/service1: Invalid Oracle URL specified
jdbc:oracle:thin:****/****@//test/test_pwd@//server1.com:1521/service1: Invalid Oracle URL specified
Could not establish connection to database. Reason: Invalid Oracle URL specified

utplsql info
cli 3.1.2-SNAPSHOT.local
utPLSQL-java-api 3.1.2.271

@pesse

This comment has been minimized.

Copy link
Member

commented Nov 12, 2018

Hi @dev704 ,
this looks like a regular expression problem, I will investigate.
Can you try test/test_pwd@server1.com:1521/service1 (without the starting // in server addressing) meanwhile?

@pesse pesse added the bug label Nov 12, 2018

@pesse pesse self-assigned this Nov 12, 2018

@pesse pesse added this to the 3.1.3 milestone Nov 12, 2018

@dev704

This comment has been minimized.

Copy link
Author

commented Nov 12, 2018

Hi @pesse
I get the same error when removing the //
Not sure if this will make a difference, but the target server I am trying to connect to is defined as
subdomain.domain.com
test/test_pwd@sub.server1.com:1521/service1

Thanks, Coenraad

@pesse

This comment has been minimized.

Copy link
Member

commented Nov 15, 2018

Hi @dev704
I can't reproduce your problem. The log you provided suggests a problem with parsing of the connect-string, but I can't bring the current release of cli to behave the way you posted.
When I try with your command:

utplsql run test/test_pwd@//server1.com:1521/service1
jdbc:oracle:oci8:****/****@//server1.com:1521/service1: C:\app\client\sani\product\12.2.0\client_1\ocijdbc12.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
jdbc:oracle:thin:****/****@//server1.com:1521/service1: I/O-Fehler: The Network Adapter could not establish the connection
Could not establish connection to database. Reason: I/O-Fehler: The Network Adapter could not establish the connection

I always get the error message with properly split connect-string.
Is there any possibility that you share the real values which lead to that issue with me privately?
Or can you reproduce the behaviour with non-real data?

Cheers, Sam

@pesse

This comment has been minimized.

Copy link
Member

commented Nov 15, 2018

Ah, btw, the regex we use to split the given connect-string is

^([^/]+)/([^@]+)@(.*)$

So as long as you don't use / and @ in user/password I can see no way how it should fail.

@dev704

This comment has been minimized.

Copy link
Author

commented Nov 16, 2018

Hi Sam
I have retried using an incorrect password 'test123'
utplsql run test/test123@//sub-a.server1.com:1521/service1
and got:
ORA-01017: invalid username/password; logon denied
then tried again with the wrong password: 'test123!!'
utplsql run test/test123!!@//sub-a.server1.com:1521/service1
and got
Invalid Oracle URL specified

The real password has two exclamation marks as the last two characters as above 'test123!!'
Can the !! be causing an issue with the regex?

Thanks, Coenraad

@pesse

This comment has been minimized.

Copy link
Member

commented Nov 26, 2018

After some excessive testing and investigation, I believe this is a JDBC bug.
You can reproduce the same issue with sqlcl or even a default JDBC connection in java.

I opened a issue at sqlcl in the hope to get some more people engaged.
As workaround I'd ask you, @dev704 to try if it words if you use TNS-name instead.

@jgebal

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

Hi @pesse
I've just encountered the same issue.
The challenge is that we're using a shared account to run init tests on CI systems.
Change of password is not an option.

It doesn't look like a JDBC issue, as we see other Java-based apps working fine with this password.

Enclosing password with quotes: "my_p@$$wo/d" or 'my_p@$$wo/d' doesn't help for utPSLQL cli.

The following regex string could help maybe?
^([^\/]*)\/(.*)@((\/\/)?([^:]*)(:([0-9]+))?)?(:|\/)(.*)
Groups 1,2,5,7,9 hold user,pass,host,port,service_name(sid)
https://regexr.com/460ns

@pesse

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

Hi @jgebal
did you test with sqlcl?
I did my tests around ! with plain JDBC-connections without any intervention of command-line parsing etc.
Do you experience the issue for other passwords?
As of the other java-based apps: Can you give examples?

@jgebal

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

I can't give that example of Java based app, as it's in-house solution.

Does utPLSQL-cli work OK with passwords cotaining "@" or "/" ? in password?
I didn't check it thoroughly though to see what passwords are not working fine.

@pesse

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

The problems with special chars in user and password-part are solved via #133
I also wasn't able to reproduce the original issue with the latest cli-version anymore.
@dev704 could you probably test if the problem you experienced still exists with https://bintray.com/utplsql/utPLSQL-cli/download_file?file_path=utPLSQL-cli-develop-201903241854.zip?

@pesse pesse modified the milestones: 3.1.3, 3.1.7 Mar 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.