I have a problem to run pgAgent job for PostgreSQL 9.6 under ubuntu 16.04. The job is never executed.
I already configured .pgpass and added:
localhost:5432:*:postgres:mypass
Also modified the permission for .pgpass:
$ touch ~/.pgpass
$ chmod 0600 ~/.pgpass
After that I run pgAgent with no problem:
$pgagent hostaddr=127.0.0.1 dbname=mydb user=postgres
When I check the process for pgAgent I would get this result:
user@gis-srv:~$ ps aux | grep pgagent
user 153179 0.0 0.0 113844 9392 pts/26 S 17:15 0:00 pgagent hostaddr=127.0.0.1 dbname=postgres user=postgres
user 153220 0.0 0.0 113844 9360 pts/26 S 17:16 0:00 pgagent hostaddr=127.0.0.1 dbname=mydb user=postgres
user 153227 0.0 0.0 12944 936 pts/26 S+ 17:16 0:00 grep --color=auto pgagent
Here is my job setting:
Job Setting:
Schedule setting:
Step Setting:
My propblen that the job is never executed and there is no error in the errors log for PostgreSQL. Please help me to find out why jobs never run.
I am receving the following errors: from postgres.log:
2017-11-03 16:01:32.269 EDT [15344] postgres@postgres LOG: could not receive data from client: Connection reset by peer
from pgagent.log:
(attempt 9): fe_sendauth: no password supplied
Fri Nov 3 16:01:32 2017 : WARNING: Couldn't create the primary connection (attempt 10): fe_sendauth: no password supplied
Fri Nov 3 16:01:32 2017 : ERROR: Stopping pgAgent: Couldn't establish the primary connection with the database server.
Also I modified the permission .pgpass to allow everyone to access it. (Just for testing)