I'm getting the below error on deployment only when I'm switching a specific field in my datamodel to be non-nullable. If I make other changes and try to deploy it works.
Here is the datamodel I'm trying to deploy(with videoId being non-nullable as the change):
type User {
id: ID! @unique
name: String! @unique
password: String!
}
type Song {
videoId: String!
queue: Queue!
addedBy: User
}
type Queue {
id: ID! @unique
createdBy: User
name: String!
songs: [Song!]!
}
And here is the error I get when trying to deploy:
Deploying service party-listen to stage dev to server party-listen !
ERROR: Whoops. Looks like an internal server error. Search your server logs for request ID: local:management:cjjfzqee7001t093741qlundw
{
"data": {
"deploy": null
},
"errors": [
{
"message": "Whoops. Looks like an internal server error. Search your server logs for request ID: local:management:cjjfzqee7001t093741qlundw",
"path": [
"deploy"
],
"locations": [
{
"line": 2,
"column": 9
}
],
"requestId": "local:management:cjjfzqee7001t093741qlundw"
}
],
"status": 200
}
I think it's very weird behaviour especially considering I can deploy other changes fine.
What do your logs say for request id local:management:cjjfzqee7001t093741qlundw? You can find out by running docker logs -f <Prisma container id>. You can find out the Prisma container id with docker ps.
But I'm not using docker to deploy. I'm using Heroku on prisma cloud.
You can access the Prisma container in your Heroku environment.
And then run the above commands in the Heroku console?
Sorry for not being accurate before.
On Heroku, Prisma prints all logs to stdout.
You can run heroku run bash -a <your-heroku-app-name> to open a SSH bash session into your Heroku container.
When you then deploy, the internal server error should appear in your terminal which is SSHed into Heroku.
When running heroku run bash -a <your-heroku-app-name it first prints multiple of these errors about not having CONNECT privilege:
Running bash on ⬢ party-listen... up, run.3630 (Free)
Jul 11, 2018 11:28:46 AM org.postgresql.core.v3.ConnectionFactoryImpl log
WARNING: SQLException occurred while connecting to ec2-54-228-251-254.eu-west-1.compute.amazonaws.com:5432
org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Detail: User does not have CONNECT privilege.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2566)
at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:131)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:210)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)
at org.postgresql.Driver.makeConnection(Driver.java:452)
at org.postgresql.Driver.connect(Driver.java:254)
at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Jul 11, 2018 11:28:46 AM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Detail: User does not have CONNECT privilege.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2566)
at org.postgresql.core.v3.QueryExecutorImpl.<init>(QueryExecutorImpl.java:131)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:210)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:195)
at org.postgresql.Driver.makeConnection(Driver.java:452)
at org.postgresql.Driver.connect(Driver.java:254)
at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:101)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
At the end it then prints:
Obtaining exclusive agent lock...
Initializing workers...
Successfully started 1 workers.
Server running on :17673
Version is up to date.
When then deploying in another terminal window and getting the internal server error it does not output anything new in the terminal where I'm ssh'ed into. I'm new to Heroku and prisma so I'm sorry if I ask any stupid questions.
@marktani
Hello Nilan, I get the same issue, but I am deploying locally (not docker or heroku).
This issue wasn't occurring a couple days ago using the same setup.
1) Where would I find the server logs?
2) Any idea how to fix this?
Thank you.
@ankerbachryhl I can't tell right now why the logs are not showing up. What you shared so far is expected (the connection errors go away after the container boots up correctly).
@yoorw, please review my first comment.
@marktani Fair :) I'm not in a hurry in any way. Just found it weird.
I will continue debugging on my own.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm also having this issue. Did this ever get resolved?
@seawatts Can you share more info about the problem you are having?
@pantharshit00 I have created a new prism project with init, and chose existing postgres database, which is currently hosted in heroku. It gave me an error at the end of the init process
Generating schema... !
â–¸ Syntax Error: Expected Name, found (
GraphQL request (11:45)
10: hour_of_day: Int
11: id: UUID! @default(value: uuid_generate_v4()) @unique
^
12: minute_of_hour: Int
at syntaxError (~/.config/yarn/global/node_modules/graphql/error/syntaxError.js:24:10)
Which looks like it's the same as https://github.com/prisma/prisma/issues/2781
If I try to run prisma deploy it gives me the error:
Could not connect to server at http://localhost:4466. Please check if your server is running.
So then when I try to run docker-compose up it gives me the following error:
org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Detail: User does not have CONNECT privilege.
I have the exact same problem. ssl is set to true in docker-compose.yml.
Feb 14, 2019 8:22:19 AM org.postgresql.Driver connect
prisma_1 | SEVERE: Connection error:
prisma_1 | org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Hello,
same problem here:
2019-02-23T16:17:58.029511100Z
Feb 23, 2019 4:17:58 PM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: FATAL: permission denied for database "postgres"
Detail: User does not have CONNECT privilege.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2566)
at org.postgresql.core.v3.QueryExecutorImpl.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:210)
Hello, same problem here when using Heroku postgres and Docker.
Same problem here! Any updates on this issue?
@bobsingor
Can you please provide a minimal reproduction?
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.
For us this happens after upgrading prisma docker image using the following commands:
docker pull prismagraphql/prisma:1.14-heroku
docker images
docker tag ${IMAGE_TAG} registry.heroku.com/${HEROKU_APP_NAME}/web
docker push registry.heroku.com/${HEROKU_APP_NAME}/web
heroku container:release web --app=${HEROKU_APP_NAME}
@realAlexBarge
Maybe check you Heroku postgres instance. Heroku might be automatically changing the permissions on the free plan.
I am also having this error. I see pgAdmin on my local system being connected to . So I don't think it is Heroku doing anything for this error. This is somewhere in docker container.
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.
@devin6391
Can you please provide a minimal reproduction?
any solution to this issue? I am deploying locally (not docker or heroku).
This issue wasn't occurring until a few hours ago using the same setup
same issue here.
it works for minutes if I stop and restart the Docker process or restart the dyno at Heroku level
then after a couple of minutes I encounter the same problem again
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.