错误1. ERROR: child process failed, exited with error number 100
可能原因:
1.没有正确关闭服务
2.服务已经启动
3.conf文件的参数配置错误。
错误2. "errmsg" : "not authorized on admin to execute command { shutdown: 1.0, $clusterTime: { clusterTime: Timestamp(1519725156, 1), signature: { hash: BinData(0, 476DC7E7EFED899078F2044EA1E58163CC9D5BC9), keyId: 6527148863013257217 } }, $db: \"admin\" }"
没有权限执行相关命令,可以通过验证相关权限,或者使用账号密码登入。
use admin;
db.auth("test","test") 注意这里是逗号
然后再执行相关命令。
错误3. "errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: localhost.localdomain:27017; the following nodes did not respond affirmatively: localhost:27018 failed with not authorized on admin to execute command { replSetHeartbeat: \"rsmxqtest\", pv: 1, v: 2, from: \"localhost.localdomain:27017\", fromId: 0, checkEmpty: false }",
1.创建一个keyfile
openssl rand -base64 756 > /mongodb27010/autokey
chmod 400 /mongodb27010/autokey
2.将keyfile拷贝到其他从节点
3.在每个节点的conf文件中添加keyfile
keyFile = /mongodb27010/autokey
错误4. "errmsg" : "not master and slaveOk=false"
设置从节点允许读操作
rs.slaveOk();
备注:
作者:
博客:
本站点所有随笔都是原创,欢迎大家转载;但转载时必须注明文章来源,且在文章开头明显处给明链接,否则保留追究责任的权利。
《欢迎交流讨论》
|
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
-
-
-
-
Redis 字符串 SDS
SDS 简单动态字符串。 SDS的结构: struct sdshdr{ int len;//记录BUF数组中已使用字节的数量 ,等于SDS所八寸字符串的...
[阅读全文]
网友评论