gpt4 book ai didi

Mongodb:ACCESS [main] 错误打开文件:/mongo/key.txt: bad file

转载 作者:行者123 更新时间:2023-12-04 01:40:13 25 4
gpt4 key购买 nike

  • 生成key.txt

  • 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

    enter image description here

    最佳答案

    检查容器中/mongo/key.txt 的所有者和属性。它必须是这样的:

    root@243810c57e61:/# ll /etc/mongo/replkey 
    -r-------- 1 mongodb root 1024 Sep 27 12:19 /etc/mongo/replkey

    关于Mongodb:ACCESS [main] 错误打开文件:/mongo/key.txt: bad file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57800119/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com