You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mongodb replicaset + sharding setup is successfull.
Actual Result:
Sharding is not done. When checked sharding status on query server, got below :
mongos> sh.status()
2018-11-22T12:43:55.858+0000 E QUERY [thread1] Error: error: {
"ok" : 0,
"errmsg" : "Surprised to discover that mongo-04:27017 does not believe it is a config server",
"code" : 72
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCommandCursor@src/mongo/shell/query.js:689:1
DBQuery.prototype._exec@src/mongo/shell/query.js:118:28
DBQuery.prototype.hasNext@src/mongo/shell/query.js:276:5
DBCollection.prototype.findOne@src/mongo/shell/collection.js:289:10
printShardingStatus@src/mongo/shell/utils_sh.js:556:19
sh.status@src/mongo/shell/utils_sh.js:78:5
@(shell):1:1
When checked mongod.conf for config server, found that below option was missing : sharding: clusterRole: configsvr
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Cookbook version
1.2.0
Chef-client version
14.6.47
Platform Details
Ubuntu 16.04
Scenario:
Setup Mongodb with replica set + sharding
Steps to Reproduce:
Follow steps given in README.md
https://github.com/sous-chefs/mongodb#sharding--replication
Expected Result:
Mongodb replicaset + sharding setup is successfull.
Actual Result:
Sharding is not done. When checked sharding status on query server, got below :
mongos> sh.status()
2018-11-22T12:43:55.858+0000 E QUERY [thread1] Error: error: {
"ok" : 0,
"errmsg" : "Surprised to discover that mongo-04:27017 does not believe it is a config server",
"code" : 72
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCommandCursor@src/mongo/shell/query.js:689:1
DBQuery.prototype._exec@src/mongo/shell/query.js:118:28
DBQuery.prototype.hasNext@src/mongo/shell/query.js:276:5
DBCollection.prototype.findOne@src/mongo/shell/collection.js:289:10
printShardingStatus@src/mongo/shell/utils_sh.js:556:19
sh.status@src/mongo/shell/utils_sh.js:78:5
@(shell):1:1
When checked mongod.conf for config server, found that below option was missing :
sharding: clusterRole: configsvr
Above option is required to know that it is a config server.
https://docs.mongodb.com/manual/reference/configuration-options/#sharding.clusterRole
After adding above option in config server mongod.conf and server restart, sharding was successfull.
The text was updated successfully, but these errors were encountered: