typesense / typesense-mongodb

A Node.js CLI to sync documents from a MongoDB collection to Typesense.
https://typesense.org/docs/0.21.0/guide/mongodb-full-text-search.html
Apache License 2.0
28 stars 5 forks source link

MongoDb Topology is closed error #10

Open kutlayozger opened 2 years ago

kutlayozger commented 2 years ago

Description

I installed typesense and typesense-mongodb typesense-mongodb cli gives an error below. UnhandledPromiseRejectionWarning: MongoError: Topology is closed, please connect

Steps to reproduce

MongoDB and typesense-mongodb installed on windows and typesense installed on ubuntu (192.168.1.71).

I wrote below command in terminal typesense-mongodb --mongo-collection=test --mongo-database=test --typesense-collection=log --mongo-url=mongodb://localhost:27017/?replicaSet=rs0 --typesense-url=http://192.168.1.71:8108 --typesense-api-key=xyz It gives an error shown below picture. image

How would I solve this problem?

jasonbosco commented 2 years ago

@kutlayozger I just found this seemingly related comment suggesting that this could happen if the credentials provided are incorrect: https://github.com/Automattic/monk/issues/290#issuecomment-916135714