cognitom / momy

MongoDB to MySQL replication
https://www.npmjs.com/package/momy
MIT License
98 stars 37 forks source link

Replica set with data #24

Closed MumblesNZ closed 6 years ago

MumblesNZ commented 6 years ago

I followed the instruction for setting up a replica set with no data and everything seems fine. Now I have data when I reboot the mongo instance using <mongod --replSet "rs0" --oplogSize 100> it seems to fail with the following errors:

forms-db_1 | 2018-09-14T04:39:26.741+0000 W REPL [replexec-0] Locally stored replica set configuration does not have a valid entry for the current node; waiting for reconfig or remote heartbeat; Got "NodeNotFound: No host described in new configuration 1 for replica set rs0 maps to this node" while validating { _id: "rs0", version: 1, protocolVersion: 1, writeConcernMajorityJournalDefault: true, members: [ { _id: 0, host: "9f7ecacad1f6:27017", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, tags: {}, slaveDelay: 0, votes: 1 } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorModes: {}, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5b9ae14fb9795b68247cb92f') } } forms-db_1 | 2018-09-14T04:39:26.741+0000 I REPL [replexec-0] New replica set config in use: { _id: "rs0", version: 1, protocolVersion: 1, writeConcernMajorityJournalDefault: true, members: [ { _id: 0, host: "9f7ecacad1f6:27017", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, tags: {}, slaveDelay: 0, votes: 1 } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorModes: {}, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5b9ae14fb9795b68247cb92f') } } forms-db_1 | 2018-09-14T04:39:26.741+0000 I REPL [replexec-0] This node is not a member of the config forms-db_1 | 2018-09-14T04:39:26.742+0000 I REPL [replexec-0] transition to REMOVED from STARTUP forms-db_1 | 2018-09-14T04:39:26.742+0000 I REPL [replexec-0] Starting replication storage threads forms-db_1 | 2018-09-14T04:39:26.743+0000 I REPL [replexec-0] Starting replication fetcher thread forms-db_1 | 2018-09-14T04:39:26.743+0000 I REPL [replexec-0] Starting replication applier thread forms-db_1 | 2018-09-14T04:39:26.744+0000 I REPL [replexec-0] Starting replication reporter thread forms-db_1 | 2018-09-14T04:39:26.744+0000 I REPL [rsSync-0] Starting oplog application forms-db_1 | 2018-09-14T04:44:26.737+0000 I NETWORK [LogicalSessionCacheRefresh] Starting new replica set monitor for rs0/9f7ecacad1f6:27017 forms-db_1 | 2018-09-14T04:44:26.745+0000 W NETWORK [LogicalSessionCacheRefresh] Unable to reach primary for set rs0 forms-db_1 | 2018-09-14T04:44:26.745+0000 I NETWORK [LogicalSessionCacheRefresh] Cannot reach any nodes for set rs0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row. forms-db_1 | 2018-09-14T04:44:27.247+0000 W NETWORK [LogicalSessionCacheRefresh] Unable to reach primary for set rs0

Any help would be appreciated.

Thanks.

MumblesNZ commented 6 years ago

Sorted my issue by creating a proper 3 node replica set with config etc.