Re: PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guy Rouillier <guyr(at)burntmail(dot)com>
Cc: PgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail
Date: 2012-02-29 09:13:17
Message-ID: CA+OCxoxXuU-9qGYpRSAbOCg7=CfDOm6eSTqLLWDceKuD1b3aQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Wed, Feb 29, 2012 at 7:39 AM, Guy Rouillier <guyr(at)burntmail(dot)com> wrote:
> I started writing this after struggling and Googling for hours and not
> getting anywhere.  I'm running EnterpriseDB 9.1.2.2 64-bit on Windows 7
> 64-bit.  I installed pgAdmin separately, version 1.14.1. The database
> appears to be working fine.  pgAgent was automatically installed and the
> service starts without error.  I see the pgAgent in the Catalog list, and
> Jobs shows in the postgres database.
>
> I'm logged in as user postgres in the postgres database.  I created the
> following table:
>
> CREATE TABLE datetest
> (
>  datestamp timestamp without time zone
> )
>
> and populated a single row:
>
> insert into datetest values(sysdate);
>
> I then created a simple test job, of type SQL, with the following
> definition:
>
> update datetest set datestamp = sysdate
>
> I scheduled this to run every 5 minutes.  When I started this email, the job
> just wouldn't run when I said Run Now, and no errors showed up in the event
> log.  I finally remembered from somewhere that Host agent has to be empty;
> sure enough, I removed "localhost" from there and then my job ran :(.
>
> So, now the only remaining issue is that in PgAdmin, the Statistics tab
> shows all runs with a status of "Failed".  But the datetest table is getting
> updated properly.  I see no events in the Application event log.  Finally, I
> ran pgAgent from the command line in DEBUG mode:
>
> DEBUG: Checking for jobs to run
> DEBUG: Creating job thread for job 2
> DEBUG: Creating DB connection: user=postgres port=5432 hostaddr=127.0.0.1
> password=xxxx dbname=postgres
> DEBUG: Allocating new connection to database postgres
> DEBUG: Starting job: 2
> DEBUG: Sleeping...
> DEBUG: Creating DB connection: user=postgres port=5432 hostaddr=127.0.0.1
> password=xxxx dbname=postgres dbname=postgres
> DEBUG: Allocating new connection to database postgres
> DEBUG: Executing SQL step 3 (part of job 2)
> DEBUG: Returning connection to database postgres
> DEBUG: Returning connection to database postgres
> DEBUG: Completed job: 2
> DEBUG: Destroying job thread for job 2
> DEBUG: Checking for jobs to run
> DEBUG: Sleeping...
>
> The run also shows a status of "Failed".  Any idea why?  Thanks.

The step or the job shows as failed? What's the output from the step?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-02-29 09:27:28 Re: Likely bug in executing pgScript on wrong database
Previous Message Guy Rouillier 2012-02-29 07:39:30 PG 9.1 Windows 7 64-bit pgAdmin says all pgAgent jobs fail