amazon-redshift-jdbc-driver icon indicating copy to clipboard operation
amazon-redshift-jdbc-driver copied to clipboard

Dbeaver error with Redshift driver "userSetServerless" is null

Open bkenny1 opened this issue 11 months ago • 9 comments

Driver version

redshift-jdbc42-2.1.0.25

Redshift version

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.63269

Client Operating System

Windows 10

JAVA/JVM version

java version "1.8.0"

Problem description

  1. Expected behaviour: When connecting from Dbeaver using current jdbc driver redshift-jdbc42-2.1.0.25 I should be able to connect successfully using SAML. We currently using the driver redshift-jdbc42-2.1.0.19 and that can connect successfully.

  2. Actual behaviour: When connecting from Dbeaver using updated jdbc driver 42-2.1.0.25 we get the error below.

  3. Error message/stack trace: Cannot invoke "String.equalsIgnoreCase(String)" because "userSetServerless" is null

  4. Any other details that can be helpful: DBeaver Version 24.0.0.202403091004 The Cluster type is a Redshift Provisioned cluster (dc2.large) ie not serverless and the error seems to be related to a serverless parameter which should not be applicable.

bkenny1 avatar Mar 15 '24 16:03 bkenny1

Hi @bkenny1 thanks for bringing this to out attention! Can you please provide DEBUG level 6 driver logs for this? Instructions on how to configure logging can be found at : https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-configuring-logging.html

bhvkshah avatar Mar 15 '24 16:03 bhvkshah

Hi @bhvkshah Thanks. I have the logs available, how do I provide them? As an attachment in the comments?

bkenny1 avatar Mar 15 '24 16:03 bkenny1

Yes, that works

bhvkshah avatar Mar 15 '24 16:03 bhvkshah

Error log userSetServerless.txt Logs attached @bhvkshah, thanks for your help

bkenny1 avatar Mar 15 '24 16:03 bkenny1

Reporting similar - SAML authentication via browser fails to connect. Internal policy prevents me from publishing a log file, but I've reviewed @bkenny1's and can confirm that the error section is identical:

       ... redacted...
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:49)
	at org.jkiss.dbeaver.ui.navigator.database.load.TreeLoadService.evaluate(TreeLoadService.java:1)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:89)
	at org.jkiss.dbeaver.ui.LoadingJob.run(LoadingJob.java:73)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:114)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because "userSetServerless" is null
        ... redacted...

eric-riggan avatar Mar 26 '24 18:03 eric-riggan

Thanks for the update. We'll have a fix for this in the next release.

bhvkshah avatar Mar 26 '24 19:03 bhvkshah

Update (for support team and in case others see this)

Was able to temporarily resolve. DBeaver version: 23.3.5 Manually set DBeaver Maven Redshift driver version to 2.1.0.26 Manually download, unzipped, and add files from redshift-jdbc42-2.1.0.26 to driver manager. Successfully configured and connected to our cluster via BrowserSAMLAuthentication with login_url parameter and SSL configured.

Unsure yet if rolling back the DBeaver version or manually setting up the driver (or both) is what fixed it, but its working now and I'm reluctant to play with it to find out 🤣

eric-riggan avatar Mar 27 '24 14:03 eric-riggan

@eric-riggan thanks for letting us know! Likely Dbeaver update fixed it, because there aren't any changes pertaining to this part of the jdbc driver between 2.1.0.25 and 2.1.0.26. Glad your issue is resolved!

bhvkshah avatar Mar 27 '24 15:03 bhvkshah

My team has been struggling with the same issue on Mac, but finally got it working today. Switching to DBeaver v23.3.5 did not help, but switching the redshift driver to v2.1.0.26 did work.

mike-eh2 avatar Apr 13 '24 17:04 mike-eh2

Resolved with 2.1.0.28 release.

bsharifi avatar May 14 '24 23:05 bsharifi

Seeing same issues with DBeaver Version 24.1.1.202406231636 and jdbc driver 2.1.0.29

bryangeiger avatar Jun 27 '24 12:06 bryangeiger

downgraded to jdbc driver 2.1.0.28 with DBeaver Version 24.1.1.202406231636 and its working, thank you.

bryangeiger avatar Jun 27 '24 12:06 bryangeiger