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

Client network socket disconnected #2323

Closed
BogdanDarius opened this issue Jul 5, 2021 · 4 comments
Closed

Client network socket disconnected #2323

BogdanDarius opened this issue Jul 5, 2021 · 4 comments

Comments

@BogdanDarius
Copy link

BogdanDarius commented Jul 5, 2021

Bug Report

Current Behavior

In version 1.26.1 SRV connection when ssl is not used works as expected.
In version 1.27.1 same configuration throws an error Client network socket disconnected before secure TLS connection was established.

Code/Gist

Expected Behavior/Code

To connect to the cluster.

Environment

  • node.js / npm versions: node v16.4.1, npm 7.17.0
  • OS: Linux 5.12.14-arch1-1

Possible Solution

Maybe some ssl is not set properly?

Additional Context/Screenshots

error

@BogdanDarius BogdanDarius changed the title Bug Report Client network socket disconnected Jul 5, 2021
@mcasimir
Copy link
Contributor

mcasimir commented Jul 6, 2021

Hi @BogdanDarius, thanks for reporting this!

Could you paste here the connection string replacing username, password, hostnames and any information you don't want to share with placeholders?

It would be also great if you could answer few questions that would help us identifying the issue:

Are you trying to connect through a proxy / VPN / tunnel of sort?
Are you trying to connect to an Altlas cluster?
Are you able to reach all the nodes of the replica set from the host you use Compass?

Could you try to connect with mongosh (https://github.com/mongodb-js/mongosh/releases/tag/v0.15.5)?

Thanks a lot!

@BogdanDarius
Copy link
Author

Hi @BogdanDarius, thanks for reporting this!

Could you paste here the connection string replacing username, password, hostnames and any information you don't want to share with placeholders?

It would be also great if you could answer few questions that would help us identifying the issue:

Are you trying to connect through a proxy / VPN / tunnel of sort?
Are you trying to connect to an Altlas cluster?
Are you able to reach all the nodes of the replica set from the host you use Compass?

Could you try to connect with mongosh (https://github.com/mongodb-js/mongosh/releases/tag/v0.15.5)?

Thanks a lot!

As I stated in the issue report, it worked fine in 1.26.1 same connection string.

No I dont use proxy/VPN/tunnel.
I am trying to connect to a mongo db cluster that's inside a K8s cluster. I can connect to nodes one by one.
I get the same error with mongosh when using srv.

This doesnt work:

mongodb+srv://MY_USERNAME:MY_PASSWORD@MY_DOMAIN/?authSource=admin&authMechanism=SCRAM-SHA-256&replicaSet=rs0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=false

This works (not using srv):

mongodb://MY_USERNAME:MY_PASSWORD@rs1.mongo.MY_DOMAIN:27017,rs0.mongo.MY_DOMAIN:27017,rs2.mongo.MY_DOMAIN:27017/?authSource=admin&authMechanism=SCRAM-SHA-256&replicaSet=rs0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=false

@mcasimir
Copy link
Contributor

mcasimir commented Jul 8, 2021

Hi @BogdanDarius we are tracking this on https://jira.mongodb.org/browse/COMPASS-4928, the work for a fix has been partially done and will be released soon.

@mcasimir
Copy link
Contributor

Fixed in 1.28.1, feel free to reopen if upgrading does not solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants