Bikerdan
Bikerdan

Reputation: 99

Getting "given config server set name: NewConfigRS differs from known set name: OldConfigRS" message when calling "show dbs"

I have recently setup a sharded cluster in Mongo with only one replica set that already had data on it. I re-used 4 other servers that were previously in a cluster for the config replica set and the mongos server (only one mongos for now).

I'm using Mongo Cloud Manager and everything seems to be running fine. When I try to show dbs or run a simple find query on a collection, I get this message:

Error: listDatabases failed:{
    "code" : 8,
    "ok" : 0,
    "errmsg" : "given config server set name: NewConfigRS differs 
                from known set name: OldConfigRS"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:62:1
shellHelper.show@src/mongo/shell/utils.js:755:19
shellHelper@src/mongo/shell/utils.js:645:15
@(shell):1:1

I've checked the mongos config file. configDB looks correct:

sharding:
  configDB: NewConfigRS/conf1:27019,conf2:27019,conf3:27019

I can connect to and run queries on the replica set directly without issue.

Mongo version: 3.2.10

What am I missing?

Upvotes: 0

Views: 159

Answers (2)

Bikerdan
Bikerdan

Reputation: 99

The issue was not with the Config Server. Everything there was just fine. What happened was that the actual nodes in the replica set were somehow caching the config details. After restarting each node in the replica set (one at a time), everything is now working.

Upvotes: 2

Vince Bowdren
Vince Bowdren

Reputation: 9208

It sounds like one of your replica sets, probably the config servers, have been not been updated correctly. You should double-check the replica set name saved in the configuration (i.e. in the local database) against the replica set named in the mongod configuration (e.g. in the mongod.conf file).

Upvotes: 0

Related Questions