Обсуждение: running jobs on a distant machine

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

running jobs on a distant machine

От
houssem jemel
Дата:
Hello

I have installed postgresql on a machine (lets call it A), in order to run jobs
In that machine all is right, i lunch pgadmin, install the service, and i could run the jobs
My problem is when i wanted to execute jobs in a distant machine, lets call it B
So I have installed pgadmin, install the service as : "c:/program files/pgadmin III/1.8/ pgAgent INSTALL pgAgent -u
user-p password hostaddr=127.0.0.1 dbname=postgres user=postgres" 
In the machine A which contains the base i created a job. This job is supposed to execute a script in the machine B.
So i put the path of this script in Defenition ("C:\test.bat"), and i Put the IP of the machine B in the field Host
Agent
But That did not work.
I am using 2 windows, No pb of connection since i can see and open the jobs database from the pgadmin of the machine B
I am using Pgadmin 1.8.4 In Machine A and 1.8.3 in B
Thank you for help






Re: running jobs on a distant machine

От
"Dave Page"
Дата:
On Tue, Jan 6, 2009 at 9:23 AM, houssem jemel <houssem20@yahoo.fr> wrote:
> Hello
>
> I have installed postgresql on a machine (lets call it A), in order to run jobs
> In that machine all is right, i lunch pgadmin, install the service, and i could run the jobs
> My problem is when i wanted to execute jobs in a distant machine, lets call it B
> So I have installed pgadmin, install the service as : "c:/program files/pgadmin III/1.8/ pgAgent INSTALL pgAgent -u
user-p password hostaddr=127.0.0.1 dbname=postgres user=postgres"
 
> In the machine A which contains the base i created a job. This job is supposed to execute a script in the machine B.
> So i put the path of this script in Defenition ("C:\test.bat"), and i Put the IP of the machine B in the field Host
Agent
> But That did not work.

The Host Agent field needs a hostname, not an IP address. With pgAgent
running on machine B, run the following query on machine A in the
database containing the pgAgent schema:

select jagstation from pgagent.pga_jobagent;

That will show you the hostnames of each agent as pgAgent sees them.
Use the appropriate one in the host agent field.


-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re : Re : running jobs on a distant machine

От
houssem jemel
Дата:
Yes i changed the hostaddr to thi IP of B, i got then the entrie of B
The job on B is now runninig
Thank you for Help



----- Message d'origine ----
De : Dave Page <dpage@pgadmin.org>
À : houssem jemel <houssem20@yahoo.fr>
Envoyé le : Mardi, 6 Janvier 2009, 12h16mn 01s
Objet : Re: Re : [pgadmin-support] running jobs on a distant machine

[Please keep replies on-list]

On Tue, Jan 6, 2009 at 11:07 AM, houssem jemel <houssem20@yahoo.fr> wrote:
> the command show only one entrie wihch is of the machine A
> Also i tried to do a telnet on 5432 from A to B but failed, is it normal
> can you also verify the command i put in B
> c:/program files/pgadmin III/1.8/ pgAgent INSTALL pgAgent -u user -p password hostaddr=127.0.0.1 dbname=postgres
user=postgres
> in service pgAgent is marked started

Shouldn't hostaddr= have the address of machine A, and not the loopback address?



--
Dave Page
EnterpriseDB UK:  http://www.enterprisedb.com






Re : Re : Re : running jobs on a distant machine

От
houssem jemel
Дата:
sorry i wanted to say:
i changed the hostaddr to thi IP of A not B



----- Message d'origine ----
De : houssem jemel <houssem20@yahoo.fr>
À : Dave Page <dpage@pgadmin.org>
Cc : pgadmin-support@postgresql.org
Envoyé le : Mardi, 6 Janvier 2009, 15h02mn 02s
Objet : Re : Re : [pgadmin-support] running jobs on a distant machine

Yes i changed the hostaddr to thi IP of B, i got then the entrie of B
The job on B is now runninig
Thank you for Help



----- Message d'origine ----
De : Dave Page <dpage@pgadmin.org>
À : houssem jemel <houssem20@yahoo.fr>
Envoyé le : Mardi, 6 Janvier 2009, 12h16mn 01s
Objet : Re: Re : [pgadmin-support] running jobs on a distant machine

[Please keep replies on-list]

On Tue, Jan 6, 2009 at 11:07 AM, houssem jemel <houssem20@yahoo.fr> wrote:
> the command show only one entrie wihch is of the machine A
> Also i tried to do a telnet on 5432 from A to B but failed, is it normal
> can you also verify the command i put in B
> c:/program files/pgadmin III/1.8/ pgAgent INSTALL pgAgent -u user -p password hostaddr=127.0.0.1 dbname=postgres
user=postgres
> in service pgAgent is marked started

Shouldn't hostaddr= have the address of machine A, and not the loopback address?



--
Dave Page
EnterpriseDB UK:  http://www.enterprisedb.com





--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support