1

I'm relatively new to SQL, but currently I'm using a VPN trying to connect into a Redshift database. Here are some of the details

Driver Name : AWS / Redshift
Host : 10.x.xxx.48
Port : 5439
Username : user_name
Database : database_name
SSL False

On my DBeaver, all of the details work, and I can connect to the DB. However, in my VSCode, I'm using

Driver : Redshift Driver (Dedicated ver)
Server Address : 10.x.xxx.48
Port : 5439
username : same as above
database : same as above
SSL Disabled

and I'm getting this error:

Error opening connection no pg_hba.conf entry for host "::ffff:10.16.14.166", user "user_name", database "database_name", SSL off

Anyone know why this happens and how to fix it? I want to emphasise that this is a company connection and I'm not the root user so I can't edit anything server-wise.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
wel
  • 234
  • 2
  • 11
  • That looks like an IPv6 address. I wonder if that is causing Redshift some confusion? – John Rotenstein Apr 14 '23 at 08:34
  • @JohnRotenstein Is there any explanation for why it works on DBeaver instead of VSCode SQLTools though? IIRC, IPv6 means that it's a ip address of made out of hexadecimal characters. This IP adress is all numbers, so I don't think it's IPv6. I may be wrong, though. – wel Apr 14 '23 at 09:29
  • `::ffff:10.16.14.166` is [IPv6 - Wikipedia](https://en.wikipedia.org/wiki/IPv6). – John Rotenstein Apr 14 '23 at 12:04
  • [QUESTION: Connecting to Redshift fails · Issue #1451 · beekeeper-studio/beekeeper-studio · GitHub](https://github.com/beekeeper-studio/beekeeper-studio/issues/1451) suggests that you should **activatee SSL**. – John Rotenstein Apr 14 '23 at 12:04
  • @JohnRotenstein Now I get an error: "Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.ctzbj8vz1ufp.eu-central-1.redshift.amazonaws.com" – wel Apr 19 '23 at 04:02
  • This is not an answer, but I have a similar issue with VSCode connection to Athena. It works from dBeaver but not VSCode. It appears that SQLTools does not take the proxy settings from VSCode and that seems to be the cause. I have opened an issue on Github for SQLTools but do not know, if the issues are actively looked at. – adbdkb May 20 '23 at 11:05

0 Answers0