Home > database >  Error directing a shard cluster "code" : 96
Error directing a shard cluster "code" : 96

Time:10-06

Mongo configuration cluster, 3 shard, each shard is double backup, a mediator, in front of the operation went well, but when entering into this step:
Mongo 127.0.0.1:9399
Use the admin
The runCommand ({addshard: "shard1/192.168.9.13:9391192168 9.14:9391192168 9.15:9391"});

Database in the following error:

Online for a long time did not solve, have know the reason? Thank you all

CodePudding user response:

Command right
Three sets of copies called shard1 shard2 shard3?

See the error log there was any abnormal

CodePudding user response:

Finally done, before the operation command I didn't post, one of the is:
Mongod - shardsvr replSet shard1 - port 9391 - dbpath/var/lib/mongo/shard1/data - the logpath/var/lib/mongo/shard1/log/shard1 log - fork - enableMajorityReadConcern -- nojournal - oplogSize 10

After I remove the here - enableMajorityReadConcern, there is no error, the concrete is the reason why I don't know ~

CodePudding user response:

- enableMajorityReadConcern seems to be a set of reading strategy, how do I feel you this configuration has a problem, nojournal, oplog just 10 MB?
I suggest that is configured to config file to start the mongo service
  • Related