daniel overdevest
daniel overdevest

Reputation: 33

Server at localhost:27017 reports wire version 0

Who knows which CLI to use to connect to an old MongoDB version which only supports wire version 0.

I've UniFi Controller on my laptop and I need to reset my password.

If found a way but need to connect to the local mongoDB server.

I get this error when use mongosh:

 mongosh --port 27117
Current Mongosh Log ID: 633d2de6a761bd5c24774a7f
Connecting to:      mongodb://127.0.0.1:27117/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.0
MongoServerSelectionError: Server at 127.0.0.1:27117 reports maximum wire version 0, but this version of the Node.js Driver requires at least 6 (MongoDB 3.6)
❯ mongosh --version
1.6.0

Which CLI to install to connectio to wire version 0 mongodb? Thanks!

Upvotes: 0

Views: 1640

Answers (1)

dododo
dododo

Reputation: 4897

wireVersion 0 means that a server version is less than 2.6. It's really ancient server. Latest shells and drivers support only servers higher than 3.6 (wire version 6). You should try to download some old legacy shell (mongo not mongosh) for example from 3.0.15 binaries here

NOTE: If you have so old binaries somewhere locally, you probably should have an appropriate mongo binary in a bin folder (with server binaries) too. Check it there.

Upvotes: 3

Related Questions