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

Proton VPN - express can't connect to "MongoDB Atlas cluster" #11223

Closed
birkskyum opened this issue May 21, 2024 · 12 comments
Closed

Proton VPN - express can't connect to "MongoDB Atlas cluster" #11223

birkskyum opened this issue May 21, 2024 · 12 comments
Labels
bug Something isn't working needs repro Needs an example to reproduce

Comments

@birkskyum
Copy link
Collaborator

birkskyum commented May 21, 2024

What version of Bun is running?

1.1.9-canary.1+4df387d59

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

make a mongodb connection

What is the expected behavior?

This issue where the backend can't connect to mongo when a VPN is active isn't happened in node

What do you see instead?

I see:

│ GET /myuser [STARTED]
│ 870 |  */
│ 871 | 
│ 872 | function _handleConnectionErrors(err) {
│ 873 |   if (err?.name === 'MongoServerSelectionError') {
│ 874 |     const originalError = err;
│ 875 |     err = new ServerSelectionError();
│                                       ^
│ MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from a…
│  code: "undefined"
│       at new MongooseError (:1:33)
│       at new MongooseServerSelectionError (:1:33)
│       at _handleConnectionErrors (/Users/admin/repos/project/node_modules/.pnpm/mongoose@8.3.4/node_modules/mongoose/lib/connection.js:875:11)
│       at /Users/admin/repos/project/node_modules/.pnpm/mongoose@8.3.4/node_modules/mongoose/lib/connection.js:826:11
│ Bun v1.1.9-canary.1+4df387d59 (macOS arm64)

Additional information

"mongoose": "^8.3.4",
"express": "^4.19.2",

VPN: Proton VPN

@birkskyum birkskyum added the bug Something isn't working label May 21, 2024
@birkskyum birkskyum changed the title VPN - can't connect to "MongoDB Atlas cluster" VPN - express can't connect to "MongoDB Atlas cluster" May 21, 2024
@robobun robobun changed the title VPN - express can't connect to "MongoDB Atlas cluster" VPN - express can't connect to "MongoDB Atlas cluster" May 21, 2024
@Electroid Electroid added the needs repro Needs an example to reproduce label May 21, 2024
@Electroid
Copy link
Contributor

This is probably fixed by #11206, which just got merged. Could you upgrade canary and try again?

@birkskyum
Copy link
Collaborator Author

birkskyum commented May 21, 2024

Same with 1.1.9-canary.1+396dc7852

Update: still on 1.1.17+bb66bba1b

@Jarred-Sumner
Copy link
Collaborator

@birkskyum can you try in #11235

bunx bun-pr jarred/web-scale

Then

bun-11235 <script

@birkskyum
Copy link
Collaborator Author

It didn't do the trick unfortunately

@birkskyum
Copy link
Collaborator Author

This is still an issue in 1.1.23 - noticed some tls fixes, but they didn't do the trick.

@Jarred-Sumner
Copy link
Collaborator

sad

@cirospaciari
Copy link
Collaborator

Maybe internally it's uses duplex upgrade to TLS

@faisalferoz
Copy link

@birkskyum Proton VPN blocks 27017 port thats why you aren't able to connect. I think there is a option to bypass VPN for certain url / hostnames (in paid version) that can help otherwise try w/o using VPN or some other VPN.

@birkskyum
Copy link
Collaborator Author

birkskyum commented Sep 18, 2024

Thanks for looking into this @faisalferoz ! It is the paid version. As shown here, there doesn't appear to be anywhere to whitelist specific urls/hostnames, but it's great to know it's the 27017 port block that cause this, and that it's potentially Proton VPN specific.

(I've tried the "Don't block" here too, and it doesn't help)
Screenshot 2024-09-18 at 13 11 19
Screenshot 2024-09-18 at 13 09 17
Screenshot 2024-09-18 at 13 09 13
Screenshot 2024-09-18 at 13 09 10

@birkskyum birkskyum changed the title VPN - express can't connect to "MongoDB Atlas cluster" Proton VPN - express can't connect to "MongoDB Atlas cluster" Sep 18, 2024
@birkskyum
Copy link
Collaborator Author

Closing - since it's not specific to bun

@faisalferoz
Copy link

faisalferoz commented Sep 18, 2024

Thanks for looking into this @faisalferoz ! It is the paid version. As shown here, there doesn't appear to be anywhere to whitelist specific urls/hostnames, but it's great to know it's the 27017 port block that cause this, and that it's potentially Proton VPN specific.

@birkskyum Its called Split Tunneling in Proton VPN - heres a link for details https://protonvpn.com/support/protonvpn-split-tunneling/

@birkskyum
Copy link
Collaborator Author

@faisalferoz - reason I couldn't find it is that it's a Windows/Android only feature for now, but hopefully will come to macos eventually, so I'll use another solution until then. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Needs an example to reproduce
Projects
None yet
Development

No branches or pull requests

5 participants