Thread: pgAgent Job never starts

pgAgent Job never starts

From
"Vincent CORDIER - LOGIXEN"
Date:
Hello;
 
I have problem with pgAgent Job that never start !
 
The pgAgent service woks "D:\Program Files\PostgreSQL\8.1\bin\pgAgent RUN pgAgent -l 2 hostaddr=127.0.0.1 dbname=postgres user=postgres"
 
I don't know how to do ??
many thanks
 

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Vincent CORDIER - LOGIXEN
Sent: 19 September 2006 10:13
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] pgAgent Job never starts

Hello;
 
I have problem with pgAgent Job that never start !
 
The pgAgent service woks "D:\Program Files\PostgreSQL\8.1\bin\pgAgent RUN pgAgent -l 2 hostaddr=127.0.0.1 dbname=postgres user=postgres"
 
I don't know how to do ??
many thanks
 
Do you have anything in the Host Agent field? If so, try removing it.
 
Regards, Dave

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 19 September 2006 12:08
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

No I have nothing in this field...
Do you have anything in the Host Agent field? If so, try removing it.
 
What type of job (sql or batch) are you running? What version of Windows? (there's a bug that prevents batch jobs running under Windows 2000).
 
Can you send the log output please?
 
Regards, Dave.

Re: pgAgent Job never starts

From
"Dave Page"
Date:
[Please keep replies on list]


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 19 September 2006 13:08
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

It's an sql job under XP... "UPDATE inscrit SET inscrit_age=inscrit_age + 1 WHERE
 inscrit_pseudo ='turtle_59';"
 
Where is the log output please ? 
 
In the Application event log, or output to stdout if you run from a command line.
 
A pg_dump of your pgagent schema would also help please.
 
Regards, Dave 

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 19 September 2006 16:22
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

It's perhaps this file ? 
 
Yes, that's the event log. Note the entries in it that say things like:

Couldn't create connection: fe_sendauth: no password supplied 

In other words, pgAgent cannot connect to your database. Try configuring a pgpass.txt file with the appropriate password in it, per the documentation at:

http://www.pgadmin.org/docs/1.4/pgagent-install.html

(in particular, the Security Concerns section at the bottom).

Regards, Dave.

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 10:39
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Hello,
 
I created a connection string like that  "localhost:5432:marketing:postgres:zryt678" in %APPDATA%\postgresql\pgpass.conf
 
but that dosen't work I have in my log file this message :

"Couldn't create connection: fe_sendauth: no password supplied"

thank you 

Perhaps you need a similar entry for the database in which the pgAgent configuration data is stored? (probably the postgres database). 

Regards, Dave.

Re: pgAgent Job never starts

From
"Dave Page"
Date:
Because pgAgent must connect to the database where the jobs are defined as well as whichever ones you are running jobs in.
 
Regards, Dave


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 12:54
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

What ? I don't understand...sorry
----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 12:03 PM
Subject: Re: [pgadmin-support] pgAgent Job never starts

 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 10:39
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Hello,
 
I created a connection string like that  "localhost:5432:marketing:postgres:zryt678" in %APPDATA%\postgresql\pgpass.conf
 
but that dosen't work I have in my log file this message :

"Couldn't create connection: fe_sendauth: no password supplied"

thank you 

Perhaps you need a similar entry for the database in which the pgAgent configuration data is stored? (probably the postgres database). 

Regards, Dave.

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 12:59
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Ok I understand but I don't know that I have to do yet... :-( 
 
My  %APPDATA%\postgresql\pgpass.conf  file is ok  
 
No it isn't otherwise you almost certainly wouldn't get the error... unless the connection string you installed pgAgent with is incorrect.
 
If you email the pgpass.conf file across (with the actual passwords replaced with XXX or something, and include the pgAgent command line I'll check it.
 
Regards Dave 

Re: pgAgent Job never starts

From
"Dave Page"
Date:
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 15:08
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Here is the the pgAgent command line :
 
"D:\Program Files\PostgreSQL\8.1\bin\pgAgent" INSTALL pgAgent -l 2 -u postgres -p XXXXX
 
hostaddr=127.0.0.1 dbname=postgres user=postgres
 
and the pgpass.conf file  
 
OK, this modified pgpass.conf should do the job:
 
# This entry is required to connect and run the job step
localhost:5432:solofamily:postgres:XXXXXX
 
# This entry is required to access the pgAgent configuration
localhost:5432:postgres:postgres:XXXXX
 
Install that, restart pgAgent and the errors in the event log should vanish and the job should run.
 
Regards, Dave 

Re: pgAgent Job never starts

From
"Dave Page"
Date:
Oh, sorry - spotted something else - 127.0.0.1 is not the same as localhost as far as pgpass.conf is concerned. The easiest test is pribably to add the following to the pgpass.conf:

127.0.0.1:5432:solofamily:postgres:XXXXXX

127.0.0.1:5432:postgres:postgres:XXXXX
 
In production though, I would standardise your pgAgent config and everything else to use one or the other.
 
Regards, Dave
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 13:51
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

It's the same error message :

"Couldn't create connection: fe_sendauth: no password supplied" :-(

----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 2:41 PM
Subject: Re: [pgadmin-support] pgAgent Job never starts

 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 15:08
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Here is the the pgAgent command line :
 
"D:\Program Files\PostgreSQL\8.1\bin\pgAgent" INSTALL pgAgent -l 2 -u postgres -p XXXXX
 
hostaddr=127.0.0.1 dbname=postgres user=postgres
 
and the pgpass.conf file  
 
OK, this modified pgpass.conf should do the job:
 
# This entry is required to connect and run the job step
localhost:5432:solofamily:postgres:XXXXXX
 
# This entry is required to access the pgAgent configuration
localhost:5432:postgres:postgres:XXXXX
 
Install that, restart pgAgent and the errors in the event log should vanish and the job should run.
 
Regards, Dave 

Re: pgAgent Job never starts

From
"Dave Page"
Date:
So to recap:
 
- You have a pgpass.conf file in C:\Documents and Settings\postgres\Application Data\postgresql
 
- It has entries for:
 
127.0.0.1:5432:solofamily:postgres:XXXXXX
127.0.0.1:5432:postgres:postgres:XXXXX
localhost:5432:solofamily:postgres:XXXXXX
localhost:5432:postgres:postgres:XXXXX
 
- The pgAgent schema is in the postgres database.
 
- The job step runs in the solofamily database.
 
- pgAgent is running as a service, and was installed with the command:
 
"D:\Program Files\PostgreSQL\8.1\bin\pgAgent" INSTALL pgAgent -l 2 -u postgres -p XXXXX hostaddr=127.0.0.1 dbname=postgres user=postgres
 
I cannot think of anything else that would cause this error assuming all the above is correct. Can you confirm that for me please, and that you have restarted pgAgent?
 
Regards, Dave


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 14:36
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

I did it but no change...all the same message.
----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 3:34 PM
Subject: RE: [pgadmin-support] pgAgent Job never starts

Create one then.
 
Regards, Dave.


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 14:26
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Right, but I don't have postgresql folder in C:\Documents and Settings\postgres\Application Data\
----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 3:25 PM
Subject: RE: [pgadmin-support] pgAgent Job never starts

Right, but pgAgent runs under the postgres account, so it should be in:
 
C:\Documents and Settings\postgres\Application Data\postgresql
 
Regards, Dave.

From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 14:13
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

It's in C:\Documents and Settings\Vincent\Application Data\postgresql
----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 3:10 PM
Subject: RE: [pgadmin-support] pgAgent Job never starts

Where is your pgpass.conf file? Are you sure it's in the postgres user's profile and not yours?
 
Regards Dave.


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 14:05
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

always the same message :

Couldn't create connection: fe_sendauth: no password supplied...

----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 2:58 PM
Subject: RE: [pgadmin-support] pgAgent Job never starts

Oh, sorry - spotted something else - 127.0.0.1 is not the same as localhost as far as pgpass.conf is concerned. The easiest test is pribably to add the following to the pgpass.conf:

127.0.0.1:5432:solofamily:postgres:XXXXXX

127.0.0.1:5432:postgres:postgres:XXXXX
 
In production though, I would standardise your pgAgent config and everything else to use one or the other.
 
Regards, Dave
 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 13:51
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

It's the same error message :

"Couldn't create connection: fe_sendauth: no password supplied" :-(

----- Original Message -----
From: Dave Page
Sent: Wednesday, September 20, 2006 2:41 PM
Subject: Re: [pgadmin-support] pgAgent Job never starts

 


From: Vincent CORDIER - LOGIXEN [mailto:v.cordier@logixen.com]
Sent: 20 September 2006 15:08
To: Dave Page
Subject: Re: [pgadmin-support] pgAgent Job never starts

Here is the the pgAgent command line :
 
"D:\Program Files\PostgreSQL\8.1\bin\pgAgent" INSTALL pgAgent -l 2 -u postgres -p XXXXX
 
hostaddr=127.0.0.1 dbname=postgres user=postgres
 
and the pgpass.conf file  
 
OK, this modified pgpass.conf should do the job:
 
# This entry is required to connect and run the job step
localhost:5432:solofamily:postgres:XXXXXX
 
# This entry is required to access the pgAgent configuration
localhost:5432:postgres:postgres:XXXXX
 
Install that, restart pgAgent and the errors in the event log should vanish and the job should run.
 
Regards, Dave 

Re: pgAgent Job never starts

From
"Nagita Karunaratne"
Date:
How do I sign out of this list. I have been looking for days for the solution.
THanks.

On 9/19/06, Dave Page <dpage@vale-housing.co.uk> wrote:
>
>
>
>
>
>  ________________________________
>  From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of
> Vincent CORDIER - LOGIXEN
> Sent: 19 September 2006 10:13
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] pgAgent Job never starts
>
>
>
> Hello;
>
> I have problem with pgAgent Job that never start !
>
> The pgAgent service woks "D:\Program
> Files\PostgreSQL\8.1\bin\pgAgent RUN pgAgent -l 2
> hostaddr=127.0.0.1 dbname=postgres user=postgres"
>
> I don't know how to do ??
> many thanks
>
> Do you have anything in the Host Agent field? If so, try removing it.
>
> Regards, Dave