Prisma container keeps restarting nonstop


#1

Hi :wave:, I’m trying to launch and deploy my first Prisma service that connects to my existing Mongo DB. But for some reasons, when I launch the service: docker-compose up -d, the container keeps restarting, thus, I can’t deploy my service. I’m on Ubuntu 18.04. and below are my config and logs. Been here for the past 5 days and I’m not sure what I’m missing. Feels like I’ll never enjoy Prisma. Help, please. :sweat: :pray:

docker.yml

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.34
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: mongo
            schema: lezplay-dev
            uri: >-
             << MY CONNECTION STRING >>

prisma.yml

endpoint: http://localhost:4466
datamodel: datamodel.prisma
databaseType: document

generate:
  - generator: javascript-client
    output: ./generated/prisma-client/

sudo docker ps

$ sudo docker ps 
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                          PORTS               NAMES
e4d1f07c0695        prismagraphql/prisma:1.34   "/bin/sh -c /app/sta…"   2 hours ago         Restarting (1) 54 seconds ago                       prisma-dev_prisma_1
$ sudo docker ps 
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                  PORTS                    NAMES
e4d1f07c0695        prismagraphql/prisma:1.34   "/bin/sh -c /app/sta…"   2 hours ago         Up Less than a second   0.0.0.0:4466->4466/tcp   prisma-dev_prisma_1
$ sudo docker ps 
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                          PORTS               NAMES
e4d1f07c0695        prismagraphql/prisma:1.34   "/bin/sh -c /app/sta…"   2 hours ago         Restarting (1) 56 seconds ago                       prisma-dev_prisma_1
$ sudo docker ps 
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                  PORTS                    NAMES
e4d1f07c0695        prismagraphql/prisma:1.34   "/bin/sh -c /app/sta…"   2 hours ago         Up Less than a second   0.0.0.0:4466->4466/tcp   prisma-dev_prisma_1

sudo docker log <CONTAINER ID>

Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected host to be non-empty
        at scala.sys.package$.error(package.scala:26)
        at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:40)
        at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:48)
        at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:13)
        at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:8)
        at scala.Function0.apply$mcV$sp(Function0.scala:34)
        at scala.Function0.apply$mcV$sp$(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App.$anonfun$main$1$adapted(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:388)
        at scala.App.main(App.scala:76)
        at scala.App.main$(App.scala:74)
        at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:8)
        at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)
Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected host to be non-empty
        at scala.sys.package$.error(package.scala:26)
        at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:40)
        at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:48)
        at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:13)
        at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:8)
        at scala.Function0.apply$mcV$sp(Function0.scala:34)
        at scala.Function0.apply$mcV$sp$(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App.$anonfun$main$1$adapted(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:388)
        at scala.App.main(App.scala:76)
        at scala.App.main$(App.scala:74)
        at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:8)
        at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)
Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected host to be non-empty
        at scala.sys.package$.error(package.scala:26)
        at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:40)
        at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:48)
        at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:13)
        at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:8)
        at scala.Function0.apply$mcV$sp(Function0.scala:34)
        at scala.Function0.apply$mcV$sp$(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App.$anonfun$main$1$adapted(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:388)
        at scala.App.main(App.scala:76)
        at scala.App.main$(App.scala:74)
        at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:8)
        at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)
Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected host to be non-empty
        at scala.sys.package$.error(package.scala:26)
        at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:40)
        at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:48)
        at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:13)
        at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:8)
        at scala.Function0.apply$mcV$sp(Function0.scala:34)
        at scala.Function0.apply$mcV$sp$(Function0.scala:34)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App.$anonfun$main$1$adapted(App.scala:76)
        at scala.collection.immutable.List.foreach(List.scala:388)
        at scala.App.main(App.scala:76)
        at scala.App.main$(App.scala:74)
        at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:8)
        at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)

#2

I was finally able to resolve this issue using this github issue: https://github.com/prisma/prisma/issues/4334#issuecomment-484027811