且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

对等身份验证因celery任务中的PostgreSQL而失败

更新时间:2022-06-26 21:49:27

它看起来像您的

It looks like your pg_hba.conf is set to use peer authentication for local socket connections, meaning you can only connect as the Postgres user "chris" if you're logged in as the Linux user "chris". Your app is presumably using an IP connection rather than a socket connection, and will be subject to different authentication rules.

您可以通过以下任一方法解决此问题:

You could solve this by either:

  • 以"chris"用户身份运行Celery
  • 更改pg_hba.conf以对此特定用户和连接类型使用某种形式的密码身份验证
  • 通过将主机"设置为"127.0.0.1",将Celery配置为使用IP连接