Problem in starting pgagent after installation in ubuntu

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Problem in starting pgagent after installation in ubuntu
Date: 2019-04-23 11:34:17
Message-ID: 1556019257527-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Community,

The below is the link I'm following to install pgagent. My doubt is does
pgagent look for an already installed pgadmin? Else can it be installed
separately?

Link:
"https://www.tutorialdba.com/2017/09/how-to-schedule-postgresql-jobs-using.html"

The below is the error I'm facing while trying to run the pgAgent daemon.

--While I have given hostaddr as localhost
root(at)pgdbsrv2:~/backups# pgagent hostaddr=localhost dbname=postgres
user=postgres
root(at)pgdbsrv2:~/backups# Tue Apr 23 15:28:38 2019 WARNING: Couldn't create
the primary connection [Attempt #1]
Tue Apr 23 15:28:43 2019 WARNING: Couldn't create the primary connection
[Attempt #2]
Tue Apr 23 15:28:48 2019 WARNING: Couldn't create the primary connection
[Attempt #3]
Tue Apr 23 15:28:53 2019 WARNING: Couldn't create the primary connection
[Attempt #4]
Tue Apr 23 15:28:58 2019 WARNING: Couldn't create the primary connection
[Attempt #5]
Tue Apr 23 15:29:03 2019 WARNING: Couldn't create the primary connection
[Attempt #6]
Tue Apr 23 15:29:08 2019 WARNING: Couldn't create the primary connection
[Attempt #7]
Tue Apr 23 15:29:13 2019 WARNING: Couldn't create the primary connection
[Attempt #8]
Tue Apr 23 15:29:18 2019 WARNING: Couldn't create the primary connection
[Attempt #9]
Tue Apr 23 15:29:23 2019 WARNING: Couldn't create the primary connection
[Attempt #10]
Tue Apr 23 15:29:23 2019 ERROR: Stopping pgAgent: Couldn't establish the
primary connection with the database server.

--While I given hostaddr as "127.0.0.1"

root(at)pgdbsrv2:~/backups# pgagent hostaddr=127.0.0.1 dbname=postgres
user=postgres
root(at)pgdbsrv2:~/backups# Tue Apr 23 15:29:40 2019 ERROR: Unsupported schema
version: 3. Version 4 is required - please run pgagent_upgrade.sql.

And when I type "which pgagent" it is showing as /usr/bin/pgagent

Could you please help me where I'm heading wrong? Looking forward to hear
from you.

Regards,
Pavan

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html

Browse pgsql-admin by date

  From Date Subject
Next Message Renjith Gk 2019-04-23 14:06:35 Performance Optimisation - Identifying the correct DB
Previous Message AYahorau 2019-04-23 06:47:35 A special tool for PostgreSQL which checks its operability