windows-7 - pgAgent无法连接数据库:'fe_sendauth: no password supplied'( 在Windows7中)

我有一些关于pgAgent的问题,

[Environment ]


DB : PostgreSQL 9.3

OS : Window 7

OS login ID : someid@mail.com

pgAdmin login ID : postgres

pgAgent user : postgres 

pgAgent schema belongs to: postgres DB

DB that I'll treat : testDB (In Step configuration, I specified 'testDB' as Database.
 Connection type is 'local'. Connection string is empty.)

DB server : local machine (my laptop computer)

我安排了pgAgent作业,但连接数据库失败。

输出消息(pgAdmin >统计信息)


[Warning] Couldn't get a connection to the database (pgAgent)

windows事件查看器


Failed to create new connection to database 'testDB':'fe_sendauth: no password supplied'

我的pgpass.conf


localhost:5432:postgres:postgres:[pgAdmin password for postgres]
localhost:5432:testDB:postgres:[pgAdmin password for postgres]

我的pg_hba.conf


@remove-line-for-nolocal@#"local" is for Unix domain socket connections only

@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 @authmethodhost@
# Allow replication connections from localhost, by a user with the
# replication privilege.
@remove-line-for-nolocal@#local replication @default_username@ @authmethodlocal@
#host replication @default_username@ 127.0.0.1/32 @authmethodhost@
#host replication @default_username@ ::1/128 @authmethodhost@

pgAgent命令选项(服务>pgAgent>属性>常规选项卡)


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

pgAgent服务登录ID (服务>pgAgent>属性>登录选项卡)


id : someid@mail.com

pwd : [ someid@mail.com's password ]

时间:

[Solution ]


I made other OS login ID. (NOT need to be 'postgres' !!)
And put pgpass.conf in that ID's AppDataRoamingpostgresql

[Reason ]


pgAgent could not find pgpass.conf in login ID's directory.

控制面板>帐户管理。


login ID : anyname

real name : anyname ( C:Usersanyname )

...