toasty
toasty
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
though seeing this issue on a common tld like .com or .net on the public internet is much more concerning compared to not being able to resolve .orb.local
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
so you can reproduce this problem by running pg within a docker container via orbstack, and trying to connect to the .orb.local domain of the container in your schema.prisma file. @Nurul
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
I've actually noticed this same issue when using postgres within orbstack, orb assigns domains within the local machine and prisma is unable to resolve them, eg a local postgres container is running on postgres.backend.orb.local:5432 but prisma cannot connect to it whereas psql, tableplus, beekeeper, etc can all connect to this. i think there is an issue with how prismas engine is resolving dns in general, the prisma js package does not seem to do this
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
yes its self hosted on a custom setup, even stranger is that connecting to it via typescript code works, but using the exact same string in the schema.prisma file does not work, so i cannot run migrations, db push, etc: this works:
const prisma = new PrismaClient({
datasources: {
db: {
url: Bun.env.DATABASE,
},
},
});
const prisma = new PrismaClient({
datasources: {
db: {
url: Bun.env.DATABASE,
},
},
});
this doesn't:
datasource db {
provider = "postgresql"
url = env("DATABASE")
}
datasource db {
provider = "postgresql"
url = env("DATABASE")
}
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
trying via direct ip also does not work
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
this is still happening, its very dissapointing as ive migrated my old setup to prisma and now when i try to connect to my production instance i literally cannot do so
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
@Nurul postgres
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
im on 6.6.0
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
Prisma team please fix this asap, cant even connect to the db using your orm, might as well drop it
14 replies
PPrisma
Created by toasty on 4/11/2025 in #help-and-questions
P1001: Can't reach database server at api.mydomain.com:5432
WOW, prisma is ridiculous, the ONLY way i could get it to work was to socat TCP4-LISTEN:5432,reuseaddr,fork TCP4:api.domain.com:5432
14 replies