Client network socket disconnected error after upgrading to MongoDB driver v6

Hey David, as the Product Manager for our JavaScript Developer Experience I’m happy to jump in here - though unfortunately I don’t have a smoking gun … yet.

Client network socket disconnected before secure TLS connection was established

This error isn’t specifically a driver issue, mongoose issue or potentially even Node issue as it appears to be a TLS issue. This doesn’t mean there isn’t a breakdown somewhere in the stack that is triggered by upgrading the MongoDB Node.js driver, so the first step would be to just “see what we can see”.

Assuming you have a workload that is working properly 100% of the time with the v4 Node.js driver, and “breaks” 100% of the time with the v5+ Node.js driver could someone test this by running their workload using NODE_DEBUG=tls node ... to enable debug information printing for the net:tls module?

We’re hoping this helps surface what’s contributing to this issue.