microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 68 forks source link

Fail to connect to the PostgreSQL Flexible server on Mac (M1 Pro) #2266

Open v-ruizh opened 5 months ago

v-ruizh commented 5 months ago

OS: Mac (M1 Pro) Build Version: 20240312.1

Repro Steps:

  1. Create one PostgreSQL Flexible server in VS Code.
  2. Expand the above server -> Expand "postgre" database -> Click "Configure firewall to connect to..." to connect the server.
  3. Check whether succeeds to connect to the PostgreSQL Flexible server.

Expect: Succeed to connect to the PostgreSQL Flexible server.

Actual: Fail to connect to the PostgreSQL Flexible server with a warning. image

More Info: This issue does not reproduce on Windows 10 and Ubuntu 22.04.

JasonYeMSFT commented 5 months ago

The mismatching IP address is a known issue that we don't have control over. The message genuinely describes what's going on. Some Local Area Network Gateway has multiple outgoing IP addresses. The IP discovery service we use echoes the IP address used for the request for IP discovery, which may not match the request that goes to Azure to connect to the database. In this case, the user will need to contact the network admin to have a fixed IP addresses be assigned or maybe use a range to make sure all traffic initiated from his Local Area Network can pass the firewall.

v-xinda commented 4 months ago

Verified on the 0.22.0 build, this issue doesn't reproduce on the PostgreSQL Flexible server, but reproduces on the PostgreSQL Single server.

v-meilei commented 2 days ago

Verified the latest build v0.22.1-alpha on Windows OS, this issue also reproduces for the PostgreSQL Single/Flexible server now.