dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
39.35k stars 3.4k forks source link

On versions of Redshift driver > 2.1.0.5, ApplicationName driver property needs to be set to not cause connection failures #22979

Open rhanton opened 6 months ago

rhanton commented 6 months ago

Description

It appears that in the Java Redshift Driver v2.1.0.6, they changed the handling of driver property application_name so that if it is null, the name is created in the format appName = "[" + Thread.currentThread().getName() + "]" + stacktrace[stacktrace.length-1].toString(); which we suspect creates "too long" of an application name for the driver connection to succeed. By simply setting this property to something simple like "DBeaver", we've found that any newer Redshift driver version can be used.

See changes at https://github.com/aws/amazon-redshift-jdbc-driver/compare/v2.1.0.5...v2.1.0.6

DBeaver Version

Community Edition 23.3.3.202401211839

Operating System

macOS 14.3.1 (23D60)

Database and driver

com.amazon.redshift 2.1.0.26

Steps to reproduce

  1. Try to connect to an up-to-date Redshift database with DBeaver.
  2. DBeaver will download the latest Redshift driver (v2.1.0.26).
  3. Attempt to connect to the DB that should work, fails.
  4. If you go and download the v2.1.0.5 driver instead, it will succeed.

Additional context

No response

E1izabeth commented 6 months ago

Thank you for bug report.