Обсуждение: PgAgent Installation ERROR
Hi,
I am trying to install the service (pgAgent) on windows vista and xp
getting the following error
D:\Program Files\PostgreSQL\8.3\bin>
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
I am trying to install the service (pgAgent) on windows vista and xp
getting the following error
D:\Program Files\PostgreSQL\8.3\bin>
pgAgent INSTALL pgAgent
18:49:18: Error: Can't open registry key 'HKLM\SYSTEM\CurrentControlSet\Services
\EventLog\Application\pgAgent' (error 5: access is denied.)
18:49:18: Error: Can't set value of 'HKLM\SYSTEM\CurrentControlSet\Services\Even
tLog\Application\pgAgent\EventMessageFile' (error 5: access is denied.)
18:49:18: Error: Can't open registry key 'HKLM\SYSTEM\CurrentControlSet\Services
\EventLog\Application\pgAgent' (error 5: access is denied.)
18:49:18: Error: Can't set value of 'HKLM\SYSTEM\CurrentControlSet\Services\Even
tLog\Application\pgAgent\TypesSupported' (error 5: access is denied.)
Please suggest/advise. Is there any simple exe file which could install this?
18:49:18: Error: Can't open registry key 'HKLM\SYSTEM\CurrentControlSet\Services
\EventLog\Application\pgAgent' (error 5: access is denied.)
18:49:18: Error: Can't set value of 'HKLM\SYSTEM\CurrentControlSet\Services\Even
tLog\Application\pgAgent\EventMessageFile' (error 5: access is denied.)
18:49:18: Error: Can't open registry key 'HKLM\SYSTEM\CurrentControlSet\Services
\EventLog\Application\pgAgent' (error 5: access is denied.)
18:49:18: Error: Can't set value of 'HKLM\SYSTEM\CurrentControlSet\Services\Even
tLog\Application\pgAgent\TypesSupported' (error 5: access is denied.)
Please suggest/advise. Is there any simple exe file which could install this?
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>: > Hi, > > I am trying to install the service (pgAgent) on windows vista and xp > getting the following error > > D:\Program Files\PostgreSQL\8.3\bin> > pgAgent INSTALL pgAgent > 18:49:18: Error: Can't open registry key > 'HKLM\SYSTEM\CurrentControlSet\Services > \EventLog\Application\pgAgent' (error 5: access is denied.) > 18:49:18: Error: Can't set value of > 'HKLM\SYSTEM\CurrentControlSet\Services\Even > tLog\Application\pgAgent\EventMessageFile' (error 5: access is denied.) > 18:49:18: Error: Can't open registry key > 'HKLM\SYSTEM\CurrentControlSet\Services > \EventLog\Application\pgAgent' (error 5: access is denied.) > 18:49:18: Error: Can't set value of > 'HKLM\SYSTEM\CurrentControlSet\Services\Even > tLog\Application\pgAgent\TypesSupported' (error 5: access is denied.) > > Please suggest/advise. Is there any simple exe file which could install > this? Yes, pgagent.exe. You need administrative privileges to install though. On vista, you may need to open the command prompt with the 'Run as Administrator' option, even if your account has administrative privileges. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Hi Dave
Thanks for the reply I shall try on this
I have done that on xp and it has worked.
How ever the file generated is with 0kb. please suggest what next to be checked?
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
Thanks for the reply I shall try on this
I have done that on xp and it has worked.
How ever the file generated is with 0kb. please suggest what next to be checked?
2009/5/4 Dave Page <dpage@pgadmin.org>
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>:> Hi,Yes, pgagent.exe. You need administrative privileges to install
>
> I am trying to install the service (pgAgent) on windows vista and xp
> getting the following error
>
> D:\Program Files\PostgreSQL\8.3\bin>
> pgAgent INSTALL pgAgent
> 18:49:18: Error: Can't open registry key
> 'HKLM\SYSTEM\CurrentControlSet\Services
> \EventLog\Application\pgAgent' (error 5: access is denied.)
> 18:49:18: Error: Can't set value of
> 'HKLM\SYSTEM\CurrentControlSet\Services\Even
> tLog\Application\pgAgent\EventMessageFile' (error 5: access is denied.)
> 18:49:18: Error: Can't open registry key
> 'HKLM\SYSTEM\CurrentControlSet\Services
> \EventLog\Application\pgAgent' (error 5: access is denied.)
> 18:49:18: Error: Can't set value of
> 'HKLM\SYSTEM\CurrentControlSet\Services\Even
> tLog\Application\pgAgent\TypesSupported' (error 5: access is denied.)
>
> Please suggest/advise. Is there any simple exe file which could install
> this?
though. On vista, you may need to open the command prompt with the
'Run as Administrator' option, even if your account has administrative
privileges.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>: > Hi Dave > > Thanks for the reply I shall try on this > I have done that on xp and it has worked. > > How ever the file generated is with 0kb. please suggest what next to be > checked? What file generated? Registering the service doesn't generate any files. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Registering file is done and then defined the bat file and created a job. the backup file is getting generated but its of 0kb
plz check the following for the bat file content
--------------
@echo off
REM - backup directory can be a file server share that the PgAgent windows service account has access to
set BACKUPDIR="E:/POSTGRESJOBS/DAILYBACKUPS/"
set PGHOST="localhost"
set PGPORT="5433"
set PGUSER="postgres"
set PGBIN="C:/Program Files/PostgreSQL/8.3/bin/"
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
for /f "tokens=1-3 delims=: " %%i in ("%time%") do (
set hh=%%i
set nn=%%j
)
REM - It would be nice to use gzip in the pg_dumpall call (or if pg_dumpall supported compression as does the pg_dump)
REM here as we do on the linux/unix script
REM - but gzip is not prepackaged with windows so requires a separate install/download.
REM Our favorite all purpose compression/uncompression util for Windows is 7Zip which does have a command-line
%PGBIN%pg_dump -i -h %PGHOST% -p %PGPORT% -U %PGUSER% -F c -b -v -f "%BACKUPDIR%DATABASENAME-%year%%month%%day%%hh%.backup" DATABASENAME
--------------------------
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
plz check the following for the bat file content
--------------
@echo off
REM - backup directory can be a file server share that the PgAgent windows service account has access to
set BACKUPDIR="E:/POSTGRESJOBS/DAILYBACKUPS/"
set PGHOST="localhost"
set PGPORT="5433"
set PGUSER="postgres"
set PGBIN="C:/Program Files/PostgreSQL/8.3/bin/"
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
for /f "tokens=1-3 delims=: " %%i in ("%time%") do (
set hh=%%i
set nn=%%j
)
REM - It would be nice to use gzip in the pg_dumpall call (or if pg_dumpall supported compression as does the pg_dump)
REM here as we do on the linux/unix script
REM - but gzip is not prepackaged with windows so requires a separate install/download.
REM Our favorite all purpose compression/uncompression util for Windows is 7Zip which does have a command-line
%PGBIN%pg_dump -i -h %PGHOST% -p %PGPORT% -U %PGUSER% -F c -b -v -f "%BACKUPDIR%DATABASENAME-%year%%month%%day%%hh%.backup" DATABASENAME
--------------------------
2009/5/5 Dave Page <dpage@pgadmin.org>
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>:> Hi DaveWhat file generated? Registering the service doesn't generate any files.
>
> Thanks for the reply I shall try on this
> I have done that on xp and it has worked.
>
> How ever the file generated is with 0kb. please suggest what next to be
> checked?
--
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
hmm ok. but that command gives a proper compressed file if i run on command line.
am worried now :(
please guide me, if i have to check anything else
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
am worried now :(
please guide me, if i have to check anything else
2009/5/5 Dave Page <dpage@pgadmin.org>
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>:> Registering file is done and then defined the bat file and created a job.Looks fine to my eyes - you'll need to check the output from the
> the backup file is getting generated but its of 0kb
>
> plz check the following for the bat file content
pg_dump command for errors.
--
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>: > Registering file is done and then defined the bat file and created a job. > the backup file is getting generated but its of 0kb > > plz check the following for the bat file content Looks fine to my eyes - you'll need to check the output from the pg_dump command for errors. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Hi,
I am not yet able to get the backup file.
When I run the command thru command prompt able to get the backup file(without asking the password as I have passed an entry in pgpass.conf file) of 1mb in size. but when I use RUN NOW from aggent job getting the file generated in the given directory but its of 0kb in size.
did i miss any other steps?
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
I am not yet able to get the backup file.
When I run the command thru command prompt able to get the backup file(without asking the password as I have passed an entry in pgpass.conf file) of 1mb in size. but when I use RUN NOW from aggent job getting the file generated in the given directory but its of 0kb in size.
did i miss any other steps?
2009/5/5 Dave Page <dpage@pgadmin.org>
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>:> Registering file is done and then defined the bat file and created a job.Looks fine to my eyes - you'll need to check the output from the
> the backup file is getting generated but its of 0kb
>
> plz check the following for the bat file content
pg_dump command for errors.
--
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
On 05/05/2009 10:47, Kranti™ K K Parisa wrote: > When I run the command thru command prompt able to get the backup > file(without asking the password as I have passed an entry in pgpass.conf > file) of 1mb in size. but when I use RUN NOW from aggent job getting the > file generated in the given directory but its of 0kb in size. I don't know anything about pgAgent, but it sounds as if the job is failing for some reason and writing an empty file. Are there any logs you can check? - maybe the Windows event log or the PostgreSQL log? Also, what about permissions on the output directory - has the backup process got permission to write there? Just wild guesses.... Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
Hi,
I have got it worked from another way. written a shell scrip and created an exe for that
Now defined a windows task scheduler and given this exe file, its doing the backup perfectly. Also provided a link in application for super user, once clicked we are calling a java runtime proces and calling the exe which is generating the bakup.
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
I have got it worked from another way. written a shell scrip and created an exe for that
Now defined a windows task scheduler and given this exe file, its doing the backup perfectly. Also provided a link in application for super user, once clicked we are calling a java runtime proces and calling the exe which is generating the bakup.
2009/5/5 Raymond O'Donnell <rod@iol.ie>
On 05/05/2009 10:47, Kranti™ K K Parisa wrote:I don't know anything about pgAgent, but it sounds as if the job is
> When I run the command thru command prompt able to get the backup
> file(without asking the password as I have passed an entry in pgpass.conf
> file) of 1mb in size. but when I use RUN NOW from aggent job getting the
> file generated in the given directory but its of 0kb in size.
failing for some reason and writing an empty file. Are there any logs
you can check? - maybe the Windows event log or the PostgreSQL log?
Also, what about permissions on the output directory - has the backup
process got permission to write there?
Just wild guesses....
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------