when running db.runCommand({addShard:"rs0/localhost:10001,localhost:10002,localhost:10003"})
get an error meessage:
errmsg: cant use local host as a shard since all shards need to communicate. either use all shards and configdbs in localhost or all in actual IPs
Mongodb uses the contents of etc/hosts which is:
[dc@localhost ~]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost
Use localhost.localdomain instead of localhost.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment