yougov / mongo-connector

MongoDB data stream pipeline tools by YouGov (adopted from MongoDB)
Apache License 2.0
1.88k stars 479 forks source link

what can I do when mongod primary port is changing? #804

Open janerim opened 6 years ago

janerim commented 6 years ago

I connect mongodb(v3.4.0) and elasitsearch(v5.1.1) by mongo-connector. And I use 5 replicaSet(primary:10000, secondary:10001,10002,10003,10004).

when I start mongo-connector, my code is like below.

mongo-connector -m localhost:10000 -t localhost:9200 -d elastic2_doc_manager

I wonder that if primary port is shutdown, mongo-connector can find next primary port? or I have to configurastion any code add?

yesterday, it was happened(primary port was changed) and this morning, when I search data from elasticsearch, there is no data is exist(it means db is exist but elasticsearch is not...

so I connected mongo-connector and dbdump, dbrestore and elasticsearch indexing again.

well.. I think that problem's reason is mongo-connector. if I didn't understand mongo-connector system properly, please explain for me!!!!

gogowrong commented 5 years ago

I got the same problem, have you solved this?