Springboot 2.3.4.RELEASE 连接到 Azure 的 PostgreSQL 失败。

huangapple go评论72阅读模式
英文:

Springboot 2.3.4.RELEASE connection to Azure postgresql fails

问题

我们最近将其中一个服务升级到了2.3.4.RELEASE版本。升级后,我们无法再连接到Azure PAAS PostgreSQL,出现以下错误:
无法从数据库获取连接(jdbc:postgresql://postgisdb:5432/someDb) ,用户为 'someUser@someDB' :连接尝试失败
我们注意到PostgreSQL的依赖从4.2.14版本升级到了4.2.16版本。切换回4.2.14版本后,问题消失了。但无论如何,我想知道在当前版本上为什么会出现连接失败的问题。

英文:

We upgraded one of our services to 2.3.4.RELEASE lately. After the update, we are no longer able to connect to Azure PAAS PostgreSQL, we receive
Unable to obtain connection from database (jdbc:postgresql://postgisdb:5432/someDb) for user 'someUser@someDB': The connection attempt failed
We saw that the PostgreSQL dependency was updated from 4.2.14 to 4.2.16. Switching back to 4.2.14 made the issue disappear, but nevertheless, I would like to know why it fails on the current version.

答案1

得分: 7

Appending gssEncMode=disable to the connection string fixes the problem. We tried it and it worked for us.
For further details, check the github page

英文:

Appending gssEncMode=disable to the connection string fixes the problem. We tried it and it worked for us.
For further details, check the github page

答案2

得分: 0

解决方法:将 gssEncMode=disable 添加到连接字符串中,可以修复这个问题。

> jdbc:postgresql://x.x.x.x:5432/db-user?gssEncMode=disable

英文:

Solution: Appending gssEncMode=disable to the connection string fixes the problem.

> jdbc:postgresql://x.x.x.x:5432/db-user?gssEncMode=disable

huangapple
  • 本文由 发表于 2020年10月5日 22:47:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/64210952.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定