Thread: Postmaster won't run as service on Cygwin
Hi, I installed an postmaster for trainig and developement on my home box. It should run as win 2000 service on cygwin. Cygwin sits in I:\cygwin Data is I:\db_data\psql_data Data folder belongs to the user postgres.benutzer I (postgres) can start the postmaster on a command line. I can log in and everything seems to be OK. Then I wanted to start it as service and ran as administrator on a cygwin console: cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /cygdrive/i/db_data/pgsql_data -i" --dep ipc-daemon2 --termsig INT --user postgres --shutdown postmaster shows up in the service-management-console When I try to mouse-click it, it shows 2 boxes on the progress bar, then stalls and after quite a while it throws Error 1067 Process got unexpectedly stopped "net start postmaster" run as administrative user throws the same. "net start postmaster" run as uster postgres gives System-Error 5 access denied What now ? Andreas
Update: If I let postgresql put it's data where Cygwin proposes /usr/share/postgresl/data then the service starts as expected. Obviously it's either some hardcoded path in the binaries or I have an permission issue with Windows 2000. I'd bet on the permissions. But if the permissions aren't OK, then how can postmaster work when it is started by hand ? Where is the difference between user postgres starting postmaster as service and doing it on the cygwin-console in regards of using a data path that starts with /cygdrive/... Help ? Andreas
Update 2: OK, I've got it narrowed down even further. Don't laugh ! It's the name of the service "postmaster". This line creates a service that won't start. $ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /cygdrive/i/db_data/pgsql_data -i" --dep ipc-daemon2 --termsig INT --user postgres --shutdown but this line works: $ cygrunsrv --install postmaster5 --path /usr/bin/postmaster --args "-D /cygdrive/i/db_data/pgsql_data -i" --dep ipc-daemon2 --termsig INT --user postgres --shutdown It's not the data directory. Right now I have both services installed, but not started. "postmaster5" can be started but "postmaster" throws error 1067 go figure ... Andreas
Andreas, On Tue, Mar 16, 2004 at 04:53:07AM +0100, Andreas wrote: > It's not the data directory. > Right now I have both services installed, but not started. > "postmaster5" can be started but "postmaster" throws error 1067 Is there anything interesting in the application event log or the postmaster log file? BTW, you will probably get more traction on the pgsql-cygwin@ or cygwin@ mailing lists. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
Jason, >On Tue, Mar 16, 2004 at 04:53:07AM +0100, Andreas wrote: > > >> <>Right now I have both services installed, but not started. >> "postmaster5" can be started but "postmaster" throws error 1067 > Jason Tishler wrote: >> <>Is there anything interesting in the application event log or the >> postmaster log file? > Thanks. ;) Event log ... good point ... err ... =8-} There was an entry that said postmaster weren't allowed to access /var/log/postmaster.log I deleted this log file and now it works as expected. Live and learn ... Andreas
Andreas, On Tue, Mar 16, 2004 at 06:35:40PM +0100, Andreas wrote: > Jason Tishler wrote: > >>Is there anything interesting in the application event log or the > >>postmaster log file? > > Thanks. ;) > Event log ... good point ... err ... =8-} > There was an entry that said postmaster weren't allowed to access > /var/log/postmaster.log > I deleted this log file and now it works as expected. > > Live and learn ... Andreas No problem -- I'm glad you are up and running. Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6