728x90
mongodb secondary show dbs 에러
show dbs;
rs3:SECONDARY> show dbs;
uncaught exception: Error: listDatabases failed:{
"topologyVersion" : {
"processId" : ObjectId("62a024b73a8739206de930ae"),
"counter" : NumberLong(6)
},
"ok" : 0,
"errmsg" : "not master and slaveOk=false",
"code" : 13435,
"codeName" : "NotPrimaryNoSecondaryOk"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs/<@src/mongo/shell/mongo.js:145:19
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:97:12
shellHelper.show@src/mongo/shell/utils.js:956:13
shellHelper@src/mongo/shell/utils.js:838:15
@(shellhelp2):1:1
rs3:SECONDARY> rs.slaveOk()
WARNING: slaveOk() is deprecated and may be removed in the next major release. Please use secondaryOk() instead.
rs.secondaryOk()
rs3:SECONDARY> rs.secondaryOk()
rs3:SECONDARY> show dbs;
admin 0.000GB
config 0.000GB
local 0.000GB
728x90
'리눅스' 카테고리의 다른 글
[리눅스] dockerfile docker-php-ext-install, docker-php-ext-enable, docker-php-ext-configure 명령 (0) | 2022.06.13 |
---|---|
mongodb와 mongo-express를 Docker Compose를 사용하여 실행하는 방법 (0) | 2022.06.09 |
[리눅스] 애플 맥북 실리콘 M1에서 도커 빌드시 오류 (0) | 2022.06.07 |
[리눅스] 몽고디비 클러스터 구성하기(mongodb shard cluster) (0) | 2022.05.31 |
[리눅스] mongodb(router) - 3 (0) | 2022.05.31 |