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 rightThree 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