prisma-client-py icon indicating copy to clipboard operation
prisma-client-py copied to clipboard

P1011: Error opening a TLS connection: bad protocol version

Open shubham184 opened this issue 1 year ago • 0 comments

Bug description

I am encountering a TLS connection issue when attempting to connect to my PostgreSQL database using Prisma Migrate Dev. The specific error message is P1011: Error opening a TLS connection: bad protocol version. However, using psql for the same database, host, and user credentials does not result in any error, suggesting that the issue is specific to how Prisma handles TLS connections.

How to reproduce

  1. Configure Prisma with a PostgreSQL database that requires a TLS connection.
  2. Ensure the environment is set up with Python 3.10.10 and OpenSSL 3.1.0.
  3. Run prisma migrate dev to apply migrations.
  4. Encounter the TLS protocol version error.

Expected behavior

I expect Prisma to successfully establish a TLS connection using the same protocol version as supported by psql and not encounter any protocol version errors.

Prisma information

generator client {
  provider  = "prisma-client-py"
  interface = "asyncio"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_MIGRATION_URL")
}

Environment & setup

  • OS: Mac OS, Windows
  • Database: PostgreSQL
  • Python version: 3.10
  • Prisma version: - 0.12.0

shubham184 avatar Feb 15 '24 13:02 shubham184