Обсуждение: Problems with pgagent Jobs

Поиск
Список
Период
Сортировка

Problems with pgagent Jobs

От
"Selber, Heiko"
Дата:
Hello,
I have two problems with pgagent jobs:


1. Under certain conditions the 'Jobs' icon doesn't appear in the
pgadmin window.

I use postgres 8.0.6 on Fedora core 4 with pgadmin 1.4.2 or 1.4.1 on
FC4, and I installed the postgres DB according to the instructions.
I think that this problem occurs only if a previous version of pgadmin
is present on the same machine. A freshly installed 1.4 seems to work.

On windows I had to deinstall pgadmin, purge everything related I could
find in the registry/file system, and re-install it.


2. When I create a job pgagent doesn't seem to be triggered at all. I
run it with -l 2 in a console, not as a daemon.
It only writes its periodical debug output to the console, but nothing
happens:
DEBUG: Clearing inactive connections
DEBUG: Connection stats: total - 1, free - 0, deleted - 0
DEBUG: Checking for jobs to run
DEBUG: Sleeping...


I don't think I made an obvious mistake because pgagent works on a
second machine with roughly the same configuration.

I believe a fresh install of postgresql would help, but I cannot do it
now.

Where can I look for clues?


BTW: Where would the debug output go when pgagent runs as daemon? I
can't find anything in or near /var/log/messages or
/var/lib/pgsql/data/pg_log.

Thanks,

Heiko


Re: Problems with pgagent Jobs

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of
> Selber, Heiko
> Sent: 01 June 2006 10:27
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Problems with pgagent Jobs
>
> Hello,
>
> I have two problems with pgagent jobs:
>
>
> 1. Under certain conditions the 'Jobs' icon doesn't appear in the
> pgadmin window.
>
> I use postgres 8.0.6 on Fedora core 4 with pgadmin 1.4.2 or 1.4.1 on
> FC4, and I installed the postgres DB according to the instructions.
>
> I think that this problem occurs only if a previous version of pgadmin
> is present on the same machine. A freshly installed 1.4 seems to work.
>
> On windows I had to deinstall pgadmin, purge everything
> related I could
> find in the registry/file system, and re-install it.

I can't imagine how 2 versions of pgAdmin could conflict in this way.
More likely I suspect you used a different maintenance DB (template1
instead of postgres for example). The Jobs node will only be shown if
the pgAgent schema and objects are found in the maintenance DB specified
in the connection dialogue.

> 2. When I create a job pgagent doesn't seem to be triggered at all. I
> run it with -l 2 in a console, not as a daemon.
>
> It only writes its periodical debug output to the console, but nothing
> happens:
>
> DEBUG: Clearing inactive connections
> DEBUG: Connection stats: total - 1, free - 0, deleted - 0
> DEBUG: Checking for jobs to run
> DEBUG: Sleeping...
>
>
> I don't think I made an obvious mistake because pgagent works on a
> second machine with roughly the same configuration.

Against the same database or a different one? Also, make sure you didn't
specify a host agent in the job definition unless you know for sure what
should be in there.

> I believe a fresh install of postgresql would help, but I cannot do it
> now.

Almost certainly not required - save yourself the effort :-)

> Where can I look for clues?
>
>
> BTW: Where would the debug output go when pgagent runs as daemon? I
> can't find anything in or near /var/log/messages or
> /var/lib/pgsql/data/pg_log.

Stdout.

Regards, Dave.


Re: Problems with pgagent Jobs

От
"Selber, Heiko"
Дата:
Hi Dave, thanks for your reply.

> > 1. Under certain conditions the 'Jobs' icon doesn't appear in the
> > pgadmin window.
>
> I can't imagine how 2 versions of pgAdmin could conflict in this way.
> More likely I suspect you used a different maintenance DB (template1
> instead of postgres for example). The Jobs node will only be shown if
> the pgAgent schema and objects are found in the maintenance
> DB specified
> in the connection dialogue.


Ahh, you're right. I didn't change the connection settings after
installing pgagent and the postgres DB, so pgadmin kept using template1
(until I reinstalled it). Stupid me.


> > 2. When I create a job pgagent doesn't seem to be triggered
> at all. I
> >
> > [...]
> >
> > I don't think I made an obvious mistake because pgagent works on a
> > second machine with roughly the same configuration.
>
> Against the same database or a different one? Also, make sure
> you didn't
> specify a host agent in the job definition unless you know
> for sure what
> should be in there.


It is a different database on a different host, but the setup should be
theoretically the same. Only that they were installed by two different
persons.

And no, I didn't specify a host agent.

It is good news that I don't have to reinstall. But perhaps a service
restart or reboot would help? There might be stale locks somewhere (I am
only guessing).


> > BTW: Where would the debug output go when pgagent runs as daemon? I
>
> Stdout.

Obviously :-)


Re: Problems with pgagent Jobs

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Selber, Heiko [mailto:heiko.selber@siemens.com]
> Sent: 01 June 2006 16:35
> To: Dave Page; pgadmin-support@postgresql.org
> Subject: AW: [pgadmin-support] Problems with pgagent Jobs
>
> It is a different database on a different host, but the setup
> should be
> theoretically the same. Only that they were installed by two different
> persons.
>
> And no, I didn't specify a host agent.

Can you send a pg_dump of the pgagent schema from both machines please?

> It is good news that I don't have to reinstall. But perhaps a service
> restart or reboot would help? There might be stale locks
> somewhere (I am
> only guessing).

You can try, but I'd be amazed if it helped.

Regards, Dave

PS. I'm on holiday for a week after today so responses to emails might
be delayed!


Re: Problems with pgagent Jobs

От
"Selber, Heiko"
Дата:
Hi Dave,

no need to send you the dumps; I compared them and saw what was wrong: Some of the functions of pgagent were missing.

Apparently, pgagent.sql had gone only halfway through when it was installed.

I executed the remaining part of pgagent.sql, restarted postgres, and violà it works.

Thank you for your help,

Heiko

> -----Ursprüngliche Nachricht-----
> Von: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] Im Auftrag von Dave Page
> Gesendet: Freitag, 2. Juni 2006 11:57
> An: Selber, Heiko; pgadmin-support@postgresql.org
> Betreff: Re: [pgadmin-support] Problems with pgagent Jobs
>
>
>
> > -----Original Message-----
> > From: Selber, Heiko [mailto:heiko.selber@siemens.com]
> > Sent: 01 June 2006 16:35
> > To: Dave Page; pgadmin-support@postgresql.org
> > Subject: AW: [pgadmin-support] Problems with pgagent Jobs
> >
> > It is a different database on a different host, but the setup
> > should be
> > theoretically the same. Only that they were installed by
> two different
> > persons.
> >
> > And no, I didn't specify a host agent.
>
> Can you send a pg_dump of the pgagent schema from both
> machines please?
>
> > It is good news that I don't have to reinstall. But perhaps
> a service
> > restart or reboot would help? There might be stale locks
> > somewhere (I am
> > only guessing).
>
> You can try, but I'd be amazed if it helped.
>
> Regards, Dave
>
> PS. I'm on holiday for a week after today so responses to emails might
> be delayed!
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org
> so that your
>        message can get through to the mailing list cleanly
>


Re: Problems with pgagent Jobs

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Selber, Heiko [mailto:heiko.selber@siemens.com]
> Sent: 02 June 2006 14:57
> To: Dave Page; pgadmin-support@postgresql.org
> Subject: AW: [pgadmin-support] Problems with pgagent Jobs
>
> Hi Dave,
>
> no need to send you the dumps; I compared them and saw what
> was wrong: Some of the functions of pgagent were missing.
>
> Apparently, pgagent.sql had gone only halfway through when it
> was installed.
>
> I executed the remaining part of pgagent.sql, restarted
> postgres, and violà it works.
>
> Thank you for your help,

No problem - glad it's going now.

Regards, Dave


Re: Problems with pgagent Jobs

От
"Jim C. Nasby"
Дата:
On Fri, Jun 02, 2006 at 03:57:21PM +0200, Selber, Heiko wrote:
> Hi Dave,
> 
> no need to send you the dumps; I compared them and saw what was wrong: Some of the functions of pgagent were
missing.
> 
> Apparently, pgagent.sql had gone only halfway through when it was installed.
> 
> I executed the remaining part of pgagent.sql, restarted postgres, and viol? it works.

Dumb question: any reason that script doesn't wrap everything into a
transaction?
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


Re: Problems with pgagent Jobs

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Jim C. Nasby [mailto:jnasby@pervasive.com]
> Sent: 06 June 2006 22:13
> To: Selber, Heiko
> Cc: Dave Page; pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] Problems with pgagent Jobs
>
> On Fri, Jun 02, 2006 at 03:57:21PM +0200, Selber, Heiko wrote:
> > Hi Dave,
> >
> > no need to send you the dumps; I compared them and saw what
> was wrong: Some of the functions of pgagent were missing.
> >
> > Apparently, pgagent.sql had gone only halfway through when
> it was installed.
> >
> > I executed the remaining part of pgagent.sql, restarted
> postgres, and viol? it works.
>
> Dumb question: any reason that script doesn't wrap everything into a
> transaction?

Oversight. 'Tis done now.

/D