I'm trying to connect Elasticsearch(version 8.9.2) to MongoDB(Server Version 6.0.7) using the MongoDB connector provided by Elasticsearch on their webpage. I have a MongoDB instance that I can successfully connect to from various servers and networks using Studio 3T, but when I try to use the Elasticsearch connector, I encounter the following error:
Connector error
my_mongo_bd_intance_ip:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 64f5a87e74610cee14685304, topology_type: Unknown, servers: [<ServerDescription ('my_mongo_bd_intance_ip', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('my_mongo_bd_intance_ip:27017: [Errno 111] Connection refused')>]>
- MongoDB is running and accessible from multiple locations.
- I've confirmed that there are no issues with authentication since Studio 3T connects without any problems.
- Network connectivity has been verified as not being the issue.
- I've provided the correct host name, username, password, database name, and collection name in the Elasticsearch connector configuration.
What I am thinking is maybe I need to use ssh tunel to connect with the database maybe but no idea how to for ElasticSearch Platform.
Has anyone else encountered this issue? Any insights or solutions would be greatly appreciated.
Thank you!