How to add a MongoDB running inside Docker as a source? #32347
Replies: 5 comments 6 replies
-
Did you try to use different local address to connect to the container? ( |
Beta Was this translation helpful? Give feedback.
-
Any idea? I faced the same issue |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue. Any updates on this ? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Using host.docker.internal solved this issue for me |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm currently running Airbyte, MongoDB and and PostgreSQL as containers inside Docker. Adding the PostgreSQL database as a destination in Airbyte was no problem, but when attempting to add the MongoDB as a source, I get the following error message:
Configuration check failed:
Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake}, caused by {java.io.EOFException: SSL peer shut down incorrectly}}]
I can successfully connect to the MongoDB locally with the MongoDB Compass via the connection string:
mongodb://localhost:27017/
. The database has no password.GUI when attempting to add the MongoDB as a source in Airbyte:
Cluster Type: Self-Managed Replica Set
Connection String: mongodb://localhost:27017/
Database Name:
<DATABASE NAME>
Username:
Password:
Authentication Source: admin
On a separate attempt, I explicitly created the MongoDB database as a replica set by including
command: ["--replSet", "replica", "--bind_ip_all", "--port", "27017"]
in the docker-compose.yml and later initiating it viars.initiate();
in the mongo shell. The connection string changed tomongodb://localhost:27017/?directConnection=true
, but it resulted in the same error as above.Are there any additional settings I have to change in the MongoDB database to add it as a source, or is it a network problem?
Beta Was this translation helpful? Give feedback.
All reactions