search

Home  >  Q&A  >  body text

mongodb - mongo error when restoring database

At first, the data suddenly disappeared. Then I checked the logs and found that there were only logs for that day. I want to ask what happened?
Then the error message appears when restoring the data:
ERROR: trying to write to non-master localhost:27017
isMaster info: { ismaster: false, secondary: false, info: "can't get local. system.replset config from self or any seed (EMPTYCONFIG)", isreplicaset: true, maxBsonObjectSize: 16777216, maxMessageSizeBytes: 48000000, localTime: new Date(1483324259039), ok: 1.0 }

Thank you!

漂亮男人漂亮男人2794 days ago680

reply all(3)I'll reply

  • 迷茫

    迷茫2017-05-02 09:26:19

    The mongo you chose to restore is not the master?

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:26:19

    Please check the status of MongoDB Replication.

    This error is related to the status of Replication.

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:26:19

    I commented the replSet parameter and it can be restored, but I don’t know how to check the specific cause of data loss

    reply
    0
  • Cancelreply