添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

You have to let your session know that reading this information from a non-primary server is OK (literally)…

-bash-4.1$ mongo rs1:SECONDARY> show dbs 2018-02-01T10:37:58.457-0500 E QUERY [thread1] Error: listDatabases failed:{ "operationTime" : Timestamp(1517499476, 1), "ok" : 0, "errmsg" : "not master and slaveOk=false", "code" : 13435, "codeName" : "NotMasterNoSlaveOk", "$clusterTime" : { "clusterTime" : Timestamp(1517499476, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) _getErrorWithCode@src/mongo/shell/utils.js:25:13 Mongo.prototype.getDBs@src/mongo/shell/mongo.js:65:1 shellHelper.show@src/mongo/shell/utils.js:813:19 shellHelper@src/mongo/shell/utils.js:703:15 @(shellhelp2):1:1 rs1:SECONDARY> rs.slaveOk() rs1:SECONDARY> show dbs admin 0.000GB config 0.000GB local 0.001GB mongoengine_test 0.004GB rs1:SECONDARY>

Leave a Reply

Your email address will not be published. Required fields are marked *