pgadmin-org / pgagent

pgAgent - A job scheduler for PostgreSQL
https://www.pgadmin.org/
Other
104 stars 41 forks source link

Ability to connect using pgadmin,but unability to connect throgh pgagent job #38

Open ArashMasroor opened 2 months ago

ArashMasroor commented 2 months ago

I have a postgresql instance and pgagent on windows server.

When I try to connect to a remote Linux version of postgresql through pgagent, it happens,but when I try to connect using pgagent job I get this error:

Couldn't get a connection to the database

Pgpass on the remote server is properly configured.

ArashMasroor commented 2 months ago

I believe more info is necessary. Looking through windows event viewer the error becomes more clear: Failed to create new connection for connection string 'user=Myuser password=***** dbname=myDB host=myHost port=Port dbname=myDB': connection to server at "IP", port Port failed: FATAL: password authentication failed for user "Myuser" connection to server at "IP", port Port failed: FATAL: password authentication failed for user "Myuser" I am sure the password I entered for the connection string of my jobstep is correct. I have already tested it using psql and pgadmin. The format of my remote connection string is: host=IP port=Port dbname=myDB user=Myuser password=*****

What is wrong? Should I use another format for connection string?If Yes could you give me some example??