发表于 2015-7-9 10:05:53

MongoDb的“not master and slaveok=false”错误及解决方法

  在SECONDARY查询出发现如下错误:
  SECONDARY> show collections;
Sat Aug4 15:29:00 uncaught exception: error: { "$err" : "not master and slaveok=false", "code" : 13435 }
  这是正常的,因为SECONDARY是不允许读写的,如果非要解决,方法如下:
  SECONDARY> rs.slaveOk();
页: [1]
查看完整版本: MongoDb的“not master and slaveok=false”错误及解决方法