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

cannot open oracle connections via SSH tunnel #33849

Closed
lhoekenga opened this issue May 22, 2024 · 10 comments · Fixed by #34056
Closed

cannot open oracle connections via SSH tunnel #33849

lhoekenga opened this issue May 22, 2024 · 10 comments · Fixed by #34056

Comments

@lhoekenga
Copy link

lhoekenga commented May 22, 2024

Description

I use tunneled connections for Oracle, and I'm receiving `Cannot invoke "String.length()" because "input" is null
image

DBeaver Version

Community Edition 24.0.5.202405191503

Operating System

macOS Sonoma 14.5

Database and driver

DB: Oracle Exadata 19.c
Driver: oracle.jdbc.OracleDriver

  • com.oracle.database.jdbc:ojdbc11:RELEASE [23.2.0.0]
  • com.oracle.database.nls.orai18n:RELEASE [23.2.0.0]
  • com.oracle.database.xml.xdb6:RELEASE [18.3.0.0]
  • com.oracle.database.xmlparerv2:RELEASE [23.2.0.0]

Steps to reproduce

No response

Additional context

SSH tunneling using JSch.

@lhoekenga
Copy link
Author

lhoekenga commented May 22, 2024

It looks like during an upgrade, the "save credentials" box got checked. If I uncheck the box, the error goes away, which says to me the thing it's trying to run String.length() against is the saved password that I haven't provided via "save credentials".

Even when "save credentials" is checked, I do get a "Password required" prompt for the SSH when opening the DB connection. I leave "save password" unchecked, and I get the String.length() error.

@lhoekenga
Copy link
Author

Seems like unchecking "save credentials" was a one time fix (for each connection). The error re-appears intermittently with subsequent application sessions.

@ShadelessFox
Copy link
Member

Thank you for the bug report.

Perhaps you have exact steps required to reproduce the issue? Are you using TNS/Custom connection type?

@lhoekenga
Copy link
Author

lhoekenga commented May 22, 2024

Perhaps you have exact steps required to reproduce the issue? Are you using TNS/Custom connection type?

Basic setup

My oracle connections are set up using ldap based DSN, e.g.

jdbc:oracle:thin:@ldap://oidprd1-ora.example.edu:3060/mydatadev,cn=OracleContext,dc=example,dc=edu

authentication is set to "Oracle Database Native", with the credentials (username and password) stored.
No changes to Oracle Properties or Driver Properties.

On the SSH tab, the hostname is set to a server that has permission to access the tablespace.
I specify the username, but not the password. I leave "save credentials" unchecked. I do not modify anything under "Jump Servers" or "Advanced Settings", although the "Share this tunnel with other connections" box is checked.

replicate the issue?

I double click on the connection name, and am prompted with "Specify password for SSH tunnel". The username is pre-filled and I supply the password. I leave "Save password/passphrase" unchecked. I get prompted for 2fa (Duo), which I supply.

and then, maybe I get connected, or maybe I get the error Cannot invoke "String.length()" because "input" is null

My initial investigation seemed to support that at some point the "save credentials" checkbox under the SSH tab in the connection details became checked, and I could fix it by unchecking it... but subsequent tries have been hit-and-miss. I seem to be able to get it working again (briefly) if I change the host that I'm tunneling through.

dbeaver-debug.log.txt

@ShadelessFox
Copy link
Member

Thank you. Unfortunately, I'm still unable to reproduce the issue. We'll find the potential problems and fix them blindly.

ShadelessFox added a commit that referenced this issue May 23, 2024
@ShadelessFox ShadelessFox linked a pull request May 23, 2024 that will close this issue
serge-rider pushed a commit that referenced this issue May 24, 2024
@ShadelessFox
Copy link
Member

Please try this version and let me know if it helps: https://dbeaver.io/files/ea/

@ShadelessFox
Copy link
Member

@lhoekenga did you have a chance to test the new version? #33849 (comment)

@lhoekenga
Copy link
Author

@lhoekenga did you have a chance to test the new version? #33849 (comment)

Not yet. I'll pull it down and try.

@lhoekenga
Copy link
Author

It seems to be better. I was not able to replicate the issue.

@arhayka
Copy link
Member

arhayka commented Jun 2, 2024

@lhoekenga Thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants