Hello, anyone came across this after upgrading to ...
# orm-help
p
Hello, anyone came across this after upgrading to 1.8 and using postgres:
Copy code
Exception in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected hash under 'databases' to be non-empty
at scala.sys.package$.error(package.scala:27)
at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:38)
at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:39)
at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:15)
at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:12)
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:389)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)
at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:12)
at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)
I seem to have found a similar issue on the forums but with no answer really. @nilan do you happen to have a clue?
n
p
Yes, thank you. It’s just that what keeps happening is a password/authentication error still. I’ll kill everything and try again
n
Hm, so you receive a different error now?
p
Yes, and the
prisma_prisma_1
container keeps restarting
n
please kill & remove and try again 🙂
p
I’m doing this now…
That worked, and I think I understand where the second error came from
In your forum post, where I copied the config from to make sure it’s right, the username is
prisma
instead of
root
n
ah, well that was just an example 🙂
p
Of course, I should have looked closer before pasting 🙂
🙈 1
I’m sorry, it’s still not working 😞
Copy code
2018-05-10 18:16:42.759 UTC [30] ERROR:  database "prisma" already exists
2018-05-10 18:16:42.759 UTC [30] STATEMENT:  CREATE DATABASE "prisma"
2018-05-10 18:16:43.837 UTC [51] ERROR:  syntax error at or near "`" at character 32
2018-05-10 18:16:43.837 UTC [51] STATEMENT:  select `id`, `lastPinged` from `TelemetryInfo`
It’s hanging when deploying
n
hmm is it a fresh DB?
p
Yes
n
so it looks like the initialization was halfway aborted and the
prisma
database already exists
can you remove that from your DB and try again?
p
Sorry, remove what?
n
your DB started out "fresh", that is without any databases, schemas, tables, columns, ...
now there is a
prisma
database, from the previous initialization that failed
p
Isn’t that what I have done by using
docker-compose kill
,
down
, then
up -d
?
n
depends on your configuration 🙂 anyway, if that doesn't help I also have no further ideas at the moment and it looks like a bug!
p
Right. But by “removing the prisma database” you meant removing the docker container, right?
n
no
a postgres database wraps multiple databases... let's call the wrapper the "host" (what you connect to using an URL, port, user, pw)
you connected Prisma to the DB host.
this resulted in a new database being created, called
prisma
, within that host
p
Ok. But is it normal that the error
database "prisma" already exists
pops up after I’ve killed, downed, then re-upped the docker containers?
n
no, that's why I was suspecting that the
prisma
database survived
killed, downed, then re-upped
if that's not the case, could you please report this here: https://github.com/graphcool/prisma/? 🙂
p
Then I maybe should find a way to remove it manually
Ok
n
you can connect to your postgres host and check if the
prisma
db exists, then we know 🙂
p
By the way, would that be the reason for `Deploying service
test-api
to stage
local
to server
local
... ⣽ ` hanging forever? Or would that be a different one?
n
you can check the docker logs for the Prisma container to find out more
it can certainly be the reason
p
I found no errors, but a warning about the JWT secret
I managed to get rid of the database error by running
docker volume rm $(docker volume ls -q)
but
prisma deploy
still doesn’t work. I filed a bug as you requested!
👍 1
n
heh, that confirms my suspicion 🙂
p
You mean that they’re not related?
n
no, that the
prisma
database was still lying around somewhere
p
Yes
n
in this case, in the volumes
p
Absolutely — but unfortunately the deployment still didn’t go through.
I don’t know if I should mention this error in the postgres container though:
Copy code
2018-05-10 18:44:41.445 UTC [94] ERROR:  syntax error at or near "`" at character 32
2018-05-10 18:44:41.445 UTC [94] STATEMENT:  select `id`, `lastPinged` from `TelemetryInfo`
2018-05-10 18:49:40.495 UTC [84] ERROR:  column "data_length" does not exist at character 39
2018-05-10 18:49:40.495 UTC [84] STATEMENT:  
           SELECT table_schema, sum( data_length + index_length) / 1024 / 1024 FROM information_schema.TABLES GROUP BY table_schema
n
probably yes
👍 1