Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongod.conf is missing sharding.clusterRole=configsvr for config server #215

Open
pkazi opened this issue Nov 23, 2018 · 1 comment
Open

Comments

@pkazi
Copy link

pkazi commented Nov 23, 2018

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.

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants