Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ArashMasroor opened this issue Aug 2, 2024 · 1 comment

Comments

@ArashMasroor
Copy link

ArashMasroor commented Aug 2, 2024

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
Copy link
Author

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??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant