openssl rand -base64 666 > /mongo/key.txt chmod 600 /mongo/key.txt
--keyFile=/mongo/key.txt --replSet=MONGO_EDU_SET --dbpath=/mongo/data --logpath=/mongo/logs/a.log --logappend
2019-09-05T07:01:23.625+0000 I ACCESS [main] error opening file: /mongo/key.txt: bad file
Check the owner and attributes of /mongo/key.txt in container. It must be like this:
root@243810c57e61:/# ll /etc/mongo/replkey
-r-------- 1 mongodb root 1024 Sep 27 12:19 /etc/mongo/replkey
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With