prisma / prisma1

💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
https://v1.prisma.io/docs/
Apache License 2.0
16.55k stars 862 forks source link

New user - configuration/docker issue, but also issue... with issues. #5109

Closed jdevng closed 3 years ago

jdevng commented 4 years ago

I was referred to here because it is 'prisma2', but it really looks like prisma/prisma1 to me. Please transfer me again if this isn't the right spot.`

I believe this issue is a docker issue because it is attempting to reach mongo db outside of it's container. I would assume the prisma configuration file consumption would take care of this, but this error appears in different forms for the past two years.

The error below, MongoSocketOpenException, goes back a few years, but the usual methods of ssl, localhost vs ip, removing schema do not seem to allow the connection despite mongo compass connecting fine. Looks like docker is not able to find the mongodb server, which is why prisma deploy eventually fails.

Also, the slack channel introduction link to github results in a 404.

Appreciate any feedback.

version: '3' services: prisma: image: prismagraphql/prisma:1.34 restart: always ports:

databases: default: connector: mongo database: db ssl: true uri: >- mongodb://127.0.0.1:27017/db

db_prisma % docker-compose up Starting db_prisma_prisma_1 ... done Attaching to db_prisma_prisma_1 prisma_1 | No log level set, defaulting to INFO. prisma_1 | [INFO] Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500} prisma_1 | [INFO] Exception in monitor thread while connecting to server 127.0.0.1:27017 prisma_1 | Exception opening socket prisma_1 | com.mongodb.MongoSocketOpenException: Exception opening socket prisma_1 | [INFO] Initializing workers... prisma_1 | [INFO] Obtaining exclusive agent lock... prisma_1 | [INFO] Obtaining exclusive agent lock... Successful. prisma_1 | [INFO] Successfully started 1 workers. prisma_1 | [INFO] No server chosen by com.mongodb.async.client.ClientSessionHelper$1@31337ee6 from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]}. Waiting for 30000 ms before timing out prisma_1 | Server running on :4466

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.