cognitom / momy

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

No more documents in tailed cursor #14

Closed gdevdeiv closed 7 years ago

gdevdeiv commented 7 years ago

After a clean installation of momy, and having to set the "timestamp" field of the "mongo_to_mysql" table to something else than 0, I'm stuck getting this error.

ubuntu:~$ momy

16 Apr 20:36:52 - Connect to MySQL...
16 Apr 20:36:52 - Connect to MongoDB...
16 Apr 20:36:52 - Bigin to watch... (from 1)
16 Apr 20:36:52 - Stream closed....
16 Apr 20:36:52 - { MongoError: No more documents in tailed cursor
    at Function.MongoError.create (/home/ubuntu/.nvm/versions/node/v6.10.2/lib/node_modules/momy/node_modules/mongodb-core/lib/error.js:31:11)
    at nextFunction (/home/ubuntu/.nvm/versions/node/v6.10.2/lib/node_modules/momy/node_modules/mongodb-core/lib/cursor.js:644:50)
    at /home/ubuntu/.nvm/versions/node/v6.10.2/lib/node_modules/momy/node_modules/mongodb-core/lib/cursor.js:593:7
    at queryCallback (/home/ubuntu/.nvm/versions/node/v6.10.2/lib/node_modules/momy/node_modules/mongodb-core/lib/cursor.js:232:18)
    at /home/ubuntu/.nvm/versions/node/v6.10.2/lib/node_modules/momy/node_modules/mongodb-core/lib/connection/pool.js:461:18
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  name: 'MongoError',
  message: 'No more documents in tailed cursor',
  tailable: true,
  awaitData: true }
16 Apr 20:36:52 - Bye
gdevdeiv commented 7 years ago

Fixed it. My problem was the mongod setup, as I couldn't get the ReplicaSet to work with the given information at README.md.

As a suggestion, it might be a great idea, mostly for beginners, to add more information about how to setup the MongoDB server.

cognitom commented 7 years ago

Hi @gdevdeiv, feel free to add some documentation and pls send your PR :-)