Обсуждение: Cannot install pgAgent on Windows
I have PostgreSQL 9.0.1 correctly installed and working for a while. Now, I am facing the need of getting some tasks running automatically and I thought about using pgAgent, so, I downloaded version 3.0.0 from http://www.postgresql.org/ftp/pgadmin3/release/pgagent/ and performed the following steps:
1. I unzipped the downloaded file. The unzip process created a folder named pgAgent-3.0.0-win32 and I copied such a folder to c:\Program Files\PostgreSQL\9.0\pgAdmin III. Now I have c:\Program Files\PostgreSQL\9.0\pgAdmin III\pgAgent-3.0.0-win32 folder.
2. I ran pgAdmin III, opened the pgagent.sql script and executed it without trouble.
3. I opened the pgagent_upgrade.sql script and executed it, which displayed the following message: "column «jstconnstr» already exists in relation «pga_jobstep»". (I am translating from Spanish to English). Nevertheless, I decided to continue.
4. I opened a command prompt window and typed the following (as instructed in pgAdmin III help for pgAgent installation):
INSTALL pgagent -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgres
After hitting the enter key I got a message saying that "INSTALL is not recognized as an internal or external command, program or batch file".
5. So, I made a change and typed:
pgagent INSTALL -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgres
This time I got a message saying that "Error when starting the application because LIBPQ.dll was not found. Reinstalling the application may solve the problem".
As you can see, I am not able to correctly install pgAgent for some reason. Actually, this installation is being performed in a 32-bit Windows XP operating system for testing purposes. Finally, it will be running in our 32-bit Windows Server 2008. I use accounts with administrator privileges in both machines.
I will very much appreciate any help to solve my issue.
The error messages I am getting are in Spanish language and I am translating them to English.
Respectfully,
Jorge Maldonado
On Mar 9, 2011, at 10:45 PM, JORGE MALDONADO wrote:
Add the path to the LIBPQ.DLL to your %PATH% environment variable and try the above step again.I have PostgreSQL 9.0.1 correctly installed and working for a while. Now, I am facing the need of getting some tasks running automatically and I thought about using pgAgent, so, I downloaded version 3.0.0 from http://www.postgresql.org/ftp/pgadmin3/release/pgagent/ and performed the following steps:1. I unzipped the downloaded file. The unzip process created a folder named pgAgent-3.0.0-win32 and I copied such a folder to c:\Program Files\PostgreSQL\9.0\pgAdmin III. Now I have c:\Program Files\PostgreSQL\9.0\pgAdmin III\pgAgent-3.0.0-win32 folder.2. I ran pgAdmin III, opened the pgagent.sql script and executed it without trouble.3. I opened the pgagent_upgrade.sql script and executed it, which displayed the following message: "column «jstconnstr» already exists in relation «pga_jobstep»". (I am translating from Spanish to English). Nevertheless, I decided to continue.4. I opened a command prompt window and typed the following (as instructed in pgAdmin III help for pgAgent installation):INSTALL pgagent -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgresAfter hitting the enter key I got a message saying that "INSTALL is not recognized as an internal or external command, program or batch file".5. So, I made a change and typed:pgagent INSTALL -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgresThis time I got a message saying that "Error when starting the application because LIBPQ.dll was not found. Reinstalling the application may solve the problem".
Also if you have stackbuilder you can use that to configure pgAgent for your PG installation.
As you can see, I am not able to correctly install pgAgent for some reason. Actually, this installation is being performed in a 32-bit Windows XP operating system for testing purposes. Finally, it will be running in our 32-bit Windows Server 2008. I use accounts with administrator privileges in both machines.I will very much appreciate any help to solve my issue.The error messages I am getting are in Spanish language and I am translating them to English.Respectfully,Jorge Maldonado
On Wed, Mar 9, 2011 at 12:15 PM, JORGE MALDONADO <jorgemal1960@gmail.com> wrote: > > 3. I opened the pgagent_upgrade.sql script and executed it, which displayed > the following message: "column «jstconnstr» already exists in relation > «pga_jobstep»". (I am translating from Spanish to English). Nevertheless, I > decided to continue. > you can write to pgsql-es-ayuda@postgresql.org and send it in spanish so we don't lose in the translation... but the message seems inocuous > 4. I opened a command prompt window and typed the following (as instructed > in pgAdmin III help for pgAgent installation): > INSTALL pgagent -u postgres -p password hostaddr=127.0.0.1 dbname=postgres > user postgres > After hitting the enter key I got a message saying that "INSTALL is not > recognized as an internal or external command, program or batch file". > that INSTALL seems odd, try without it... also if pgagent is not in the PATH you will need to put the full path to it, ie: c:\Program Files\PostgreSQL\9.0\pgAdmin III\pgAgent-3.0.0-win32 or something like that > 5. So, I made a change and typed: > pgagent INSTALL -u postgres -p password hostaddr=127.0.0.1 dbname=postgres > user postgres > This time I got a message saying that "Error when starting the application > because LIBPQ.dll was not found. Reinstalling the application may solve the > problem". > you sure about that INSTALL? where did you read that? maybe can you copy here what the instruction says? -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte y capacitación de PostgreSQL
[Adding the list]
On Mar 11, 2011, at 4:25 AM, JORGE MALDONADO wrote:
i) Go to %APPDATA% directory for the user pgAgent is running under.I finally could install the service; I added the location of LIBPQ.DLL to the %Temp% environment variable and also modified a bit the command I typed in the command line as follows:pgAgent INSTALL pgAgent u- UserAccount -p password hostaddr=127.0.0.1 dbname=postgres user=postgresThe user account I used has administrative privileges in my PC which is the machine I am testing pgAgent for now.Next, I went to Control Panel/Administrative Tools/Services and locate the pgAgent service under the name of "PostgreSQL Scheduling Agent" and tried to start it without success. I checked the user it is running under and I see it is the one with administrative privileges. So I opened the Event Viewer and saw 10 errors as follows:Couldn't create the primary connection (attempt 1): fe_sendauth: no password suppliedLastly, there is another message:Stopping pgAgent: Couldn't establish the primary connection with the database server.
I suppose that I need to provide a password to connect to the PostgreSQL server and have access to the postgres database. I read that it is suggested to use a file named .pgpass so I consulted the documentation but the information provided is very general, I do not really know how to configure it and where to place it.I will very much appreciate any help.
ii) Create a directory postgresql
iii) Put the pgpass.conf file there with the content as:
hostname:port:database:username:password
e.g.
localhost:5432:postgres:postgres:postgres
Best regards,Jorge MaldonadoOn Wed, Mar 9, 2011 at 11:31 PM, Sachin Srivastava <sachin.srivastava@enterprisedb.com> wrote:Add the path to the LIBPQ.DLL to your %PATH% environment variable and try the above step again.On Mar 9, 2011, at 10:45 PM, JORGE MALDONADO wrote:I have PostgreSQL 9.0.1 correctly installed and working for a while. Now, I am facing the need of getting some tasks running automatically and I thought about using pgAgent, so, I downloaded version 3.0.0 from http://www.postgresql.org/ftp/pgadmin3/release/pgagent/ and performed the following steps:1. I unzipped the downloaded file. The unzip process created a folder named pgAgent-3.0.0-win32 and I copied such a folder to c:\Program Files\PostgreSQL\9.0\pgAdmin III. Now I have c:\Program Files\PostgreSQL\9.0\pgAdmin III\pgAgent-3.0.0-win32 folder.2. I ran pgAdmin III, opened the pgagent.sql script and executed it without trouble.3. I opened the pgagent_upgrade.sql script and executed it, which displayed the following message: "column «jstconnstr» already exists in relation «pga_jobstep»". (I am translating from Spanish to English). Nevertheless, I decided to continue.4. I opened a command prompt window and typed the following (as instructed in pgAdmin III help for pgAgent installation):INSTALL pgagent -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgresAfter hitting the enter key I got a message saying that "INSTALL is not recognized as an internal or external command, program or batch file".5. So, I made a change and typed:pgagent INSTALL -u postgres -p password hostaddr=127.0.0.1 dbname=postgres user postgresThis time I got a message saying that "Error when starting the application because LIBPQ.dll was not found. Reinstalling the application may solve the problem".Also if you have stackbuilder you can use that to configure pgAgent for your PG installation.As you can see, I am not able to correctly install pgAgent for some reason. Actually, this installation is being performed in a 32-bit Windows XP operating system for testing purposes. Finally, it will be running in our 32-bit Windows Server 2008. I use accounts with administrator privileges in both machines.I will very much appreciate any help to solve my issue.The error messages I am getting are in Spanish language and I am translating them to English.Respectfully,Jorge Maldonado