keyFile=/data/mongodb/conf/keyfile.txt #master=true slave=true autoresync=true source=xxx:27017 permissions on /data/mongodb/conf/keyfile.txt are too open keyfile.txt 的内容最好由md5生成 并且keyfile.txt 需要设置为 -r--- 1 user_00 users 939 Jun 2 11:05 keyfile.txt chmod 400 keyfi...
所以说只要keyfile没有组或者全局权限即可。 如果设置权限过大,mongod复本集直接启动失败。复本集内keyfile内容不对,也会初始化失败。 2021-11-24T22:37:18.878+0800 I ACCESS [main] permissions on /opt/mongodb/mongodb3.6.23/keyfile are too open 1. 搭建Replica Set 配置文件信息mongodb.conf如下。区别...
设置keyfile文件只读属性: 使用cd命令到你的keyfile文件所在的文件目录下,输入命令chmod 600 keyfile,然后重启你的节点就可以成功了:
sudo docker run --name mongoDB -eMONGO_INITDB_ROOT_USERNAME=admin -eMONGO_INITDB_ROOT_PASSWORD=admin -p5000:27017-vkeyfile:/opt/mongors/keyfile mongo --replSet rs0 --keyFile /opt/mongors/keyfile I got: about to fork child process, waiting until server is readyforco...
mongod --replSet rs1 --keyFile /data/k0 --fork --port 27017 --dbpath /data/rs0 --logpath=/data/log/r0.log --logappend 错误内容如下: Sun Jan 27 14:18:06 permissions on /data/k0 are too open 检查k0 文件权限: [root@vm3 data]# ll /data/k0 ...
12,根据日志钟第二行,permissions on /app/mongodb/keyfile are too open,怀疑/app/mongodb/keyfile文件权限给多了,查看权限,果然给多了,收回权限改为400, [mongo@ai-learning-mongo-2 logs]$ ll /app/mongodb/keyfile [2020/1/7 17:39:47] -rwxrwxrwx 1 mongo mongo 1024 Feb 26 2019 /app/mongo...
12,根据日志钟第二行, permissions on /app/mongodb/keyfile are too open ,怀疑/app/mongodb/keyfile文件权限给多了,查看权限,果然给多了,收回权限改为400, [mongo@ai-learning-mongo-2 logs]$ ll /app/mongodb/keyfile [2020/1/7 17:39:47] -rwxrwxrwx 1 mongo mongo 1024 Feb 26 2019 /app/...
如果文件属于mongodb但有超过400的权限, 出错permissions on / are too open. 修改之后的证书文件长这样: -r--- 1 mongodb mongodb 4.4K Nov 30 18:11 test-ca.pem -r--- 1 mongodb mongodb 5.4K Nov 30 17:19 test-server1.pem 方案2 chmod 644...
{bind_ip:"10.157.60.27",config:"/etc/mongodb.conf",dbpath:"/data",logappend:"true",logpath:"/var/log/mongodb/mongodb.log",replSet:"heythat"}TueMar516:33:15[initandlisten] exceptionininitAndListen:10309Unableto create/open lockfile:/data/mongod.lockerrno:13Permissiondenie...
key:value 行 文档 mysql里的数据: name age job city wangxiansen 25 CEO zhangsan 23 CTO lisi 24 CFO BJ mongo里的数据: 代码语言:javascript 复制 {name:'wangxiansen',age:'25',job:'CEO'},{name:'zhangsan',age:'23',job:'CTO'},{name:'lisi',age:'24',job:'CFO',city:'BJ'} ...