pgAgent 作业因身份验证错误而失败 [英] pgAgent job fails with authentication error

查看:59
本文介绍了pgAgent 作业因身份验证错误而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用名为 postgres 的本地计算机帐户安装了带有 Windows 服务的 pgAgent.我已经确认 Windows 服务运行正常.我在 pgAdmin 中创建了一个作业,该作业应该从我的客户数据库中的表中删除某些记录.作业中的唯一步骤是配置到客户数据库的本地连接类型.问题是,作业每次都会失败,并在 Windows 事件日志中写入以下警告:

I've installed pgAgent with the Windows service using a local machine account called postgres. I have confirmed that the Windows service is running normally. I created a job in pgAdmin that should delete certain records from a table in my customer DB. The only step in the job is configured with a Local connection type to the customer DB. The problem is, the job fails every time with the following warning written to the Windows event log:

无法创建到数据库 'customer' 的新连接:'fe_sendauth:未提供密码'

我已经确认在 C:\Users\postgres\AppData\Roaming\postgresql 中有一个 pgpass.conf 文件.以下是其内容:

I have verified that there is a pgpass.conf file located in C:\Users\postgres\AppData\Roaming\postgresql. Here are its contents:

localhost:5432:postgres:postgres:

我不知道还能尝试什么.我无法找到有关此错误消息的任何进一步信息,因为它适用于 pgAgent.

I am not sure what else to try. I have been unable to locate any further information about this error message as it applies to pgAgent.

版本信息:

  • PostgreSQL 9.2.4,由 Visual C++ build 1600 编译,64 位
  • pgAdmin 1.16.1
  • pgAgent v3.3.0-1

Windows 服务启动信息:

Windows service startup information:

C:\Program Files (x86)\pgAgent\bin\pgagent.exe RUN pgAgent host=localhost port=5432 user=postgres dbname=postgres

pg_hba.conf 的非注释内容:

Non-comment contents of pg_hba.conf:

host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5

推荐答案

我在PgAgentIII中的工作步骤下做了什么

What I did was under the step of the job in PgAgentIII

我将连接类型更改为远程
使用按钮设置连接字符串...
将 user=postgres 更改为我的应用程序用户名
添加密码=PASSWORD(填写您的密码)
更改主机=127.0.0.1

I changed the Connection Type To Remote
Set the Connection String with the button ...
changed the user=postgres to my apps user name
added password=PASSWORD (fill in your password)
change the host=127.0.0.1

我不再收到错误

这篇关于pgAgent 作业因身份验证错误而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆