psycopg2.OperationalError: FATAL: unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0

后端 未结 5 1790
有刺的猬
有刺的猬 2020-11-27 22:54

I\'m using Macbook

Psycopg2 works well when connecting the localhost db (PostgreSQL on Mac). The error was raised when I tried to connect PostgreSQL db on a Windows1

5条回答
  •  南方客
    南方客 (楼主)
    2020-11-27 23:20

    Using PostgresSQL 13.0 I had the same problem, displaying the error messages:

     unsupported frontend protocol 255.255: server supports 2.0
     unsupported frontend protocol 0.0: server supports 2.0 to
    

    according to this site it postgresql.org deals with the SSL / GSS Protocol Negotiation Problem. Which should already be resolved in Postgres version 12.0

    I was able to solve it following the guidelines contained in these sites: highgo.ca

    In the postgres terminal, I executed the command below setting the environment variable gssencmode = disable and the problem was solved:

      psql -h localhost -U postgres -d "dbname=belez gssencmode=disable";
    

提交回复
热议问题