Getting error: message: 'no such cmd: replSetGetConfig' in mongo-sidecar
See original GitHub issueHi all,
I have been trying to set up a mongodb replica set on k8s cluster. I am able to run all the pods, but they are not connected to each other, when I checked the logs of sidecar, I get the following error:
Addresses to add: [ '10.1.220.17:27017', '10.1.23.157:27017', '10.1.220.18:27017' ]
Addresses to remove: []
Error in workloop { MongoError: no such cmd: replSetGetConfig
at Function.MongoError.create (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/error.js:31:11)
at /opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:497:72
at authenticateStragglers (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:443:16)
at Connection.messageHandler (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:477:5)
at Socket.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/connection.js:321:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:561:20)
name: 'MongoError',
message: 'no such cmd: replSetGetConfig',
ok: 0,
errmsg: 'no such cmd: replSetGetConfig',
code: 59,
'bad cmd': { replSetGetConfig: 1 } }
Any idea what could cause this error? or How to resolve it? TIA.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
MongoDB Unauthorized: replSetGetConfig - Stack Overflow
Have tried searching around a bit but am not able to find a solution. root@mongo-db-1:~# mongo MongoDB shell version v3.4.0 connecting to ...
Read more >replSetGetConfig — MongoDB Manual
To run, replSetGetConfig must be issued against the admin database. The command ... The command errors if run with commitmentStatus: true on a...
Read more >[bitnami/mongodb] Error: error doing query: failed: network ...
I have a mongodb cluster setup on kubernetes using the bitnami helm chart. ... msg="Failed to get replSetGetConfig: (Unauthorized) command ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, ok, got it, looks like I am running 2.6, let me change that to 3 and will update.
So, restarting the whole cluster solved the issue. Probably something old that was preserving. Closing the issue.