ERROR: trying to write to non-master <host>:<port> when import data back to mongo

728 views
Skip to first unread message

Van

unread,
Nov 14, 2012, 7:14:18 PM11/14/12
to mongod...@googlegroups.com
Using mongorestore and mongoimport getting the same error, cmd similar below

mongorestore -d pets /path/to/pets


ERROR: trying to write to non-master <ip>: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, localTime: new Date(1352938132314), ok: 1.0 }

Could you tell me how to import data successfully?
similar error when I did mongoimport.

thanks

Dwight Merriman

unread,
Nov 15, 2012, 3:37:16 PM11/15/12
to mongod...@googlegroups.com
a new replica set  must be initiated before an import or restore

search for "replSetInitiate"
Reply all
Reply to author
Forward
0 new messages