Problem using Hasura with local MongoDB #10147
-
Greetings! I am doing a POC of Hasura with MongoDB. I have Hasura running in a container on my laptop (Windows 10), the enterprise version with the 30-day trial. I'm using the Docker Compose file found here: https://raw.githubusercontent.com/hasura/graphql-engine/master/install-manifests/enterprise/mongodb/docker-compose.yaml. I commented out the MongoDB container as I have MongoDB running on the same laptop with a database with some collections for the POC. I can load the Hasura console in a browser, but when try to connect to my MongoDB I am receiving the following in a popup:
I can see in the containers logs that a POST is hitting /v1/metadata and returning a 400 with the error show in the popup. I can also access http://mongo-data-connector:3000/capabilities from inside the enterprise Hasura container, so that's not an issue. I'm hoping someone can help me out with this. :) Thanks!!! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hey @toccibkfs , I just followed the steps outlined in our docs using the same image and docker-compose file you referenced without any issues on an ARM laptop. Did you follow the steps in our docs such as entering your I have asked someone with a windows machine to confirm they aren't having any issues. Have you tried creating a simple MongoDB database following the steps in our documentation and connecting it? We had some issues with the connector handling time series collections while in beta but all issues should be resolved. I will update you if we find anything. If issues persist I am happy to meet with you to help unblock you and learn more about your use case. -David |
Beta Was this translation helpful? Give feedback.
-
@toccibkfs Can you check to make sure your MongoDB server is accessible from inside the Keep in mind that you will probably need to use |
Beta Was this translation helpful? Give feedback.
-
Hey, thank you both! Using host.docker.internal in the db connection string worked famously! Sorta related -- I'm trying to use the 30-day trial of the Enterprise version. I've clicked the "ENTERPRISE" button, submitted the form and restarted the container but am not yet in Enterprise mode, according to Settings>>About. Should I have received a key in my email that needs to go in the compose file? Thanks! |
Beta Was this translation helpful? Give feedback.
@toccibkfs Can you check to make sure your MongoDB server is accessible from inside the
mongo-data-connector
service container? It is that container that is attempting to connect to MongoDB.Keep in mind that you will probably need to use
host.docker.internal
as the DNS name in your connection string (see the Docker documentation), as Hasura is trying to connect to MongoDB running on your host from the service running inside themongo-data-connector
container.