Thread: ipc-daemon2 fails to run as WinXP service
Reposting to mailing list instread of newsgroup to see if I can get a response. ipc-daemon2 will not run when installed using the --install-as-service option. Does ipc-daemon2 write a log. I didn't see one in the /var/log directory and I'm not sure where syslog goes in cygipc. My original post: ------------------ I upgraded to the latest postgresql using ipc-daemon2. I can start both ipc-daemon2 and postmaster from the command line, but when I tried to install them as a service, ipc-daemon2, fails with message: The ipc-daemon service on Local Computer started then stopped... I set the ipc_daemon2 up as a service as follows: cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path /bin/ipc-daemon2.exe --termsig INT --shutdown Also tried: ipc-daemon2 --install-as-service and this also fails with the same message. I've tried running the service under Local System account as well as Administrator accounts with the same error message resulting. Any ideas? Bill Pfeiffer
Maybe this earlier post will help.
Have you seen the following?
>
> http://www.tishler.net/jason/software/postgresql/postgresql-7.3.4.README
>
>> This is what it should read now:
>>
>> The following is the NT services Cygwin PostgreSQL installation
>> procedure
>> (with footnotes designated by "[n]"):
>>
>> 1. Install the cygipc ipc-daemon as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> shutdown the postmaster and cygipc services.
>> close the service manager screen.
>> # ipc-daemon --remove-as-service
>> # ipc-daemon2 --install-as-service
>>
>> Next skip to step 4.
>>
>> B)If it is a fresh install
>> # ipc-daemon2 --install-as-service
>>
>> 2. Create the "postgres" user account:
>>
>> # net user postgres $password /add /fullname:postgres
>> /comment:'PostgreSQL user account' /homedir:"$(cygpath -w
>> /home/postgres)" # [11]
>> # mkpasswd -l -u postgres >>/etc/passwd
>>
>> 3. Grant the "postgres" user the "Log on as a service" user right:
>>
>> # cmd /c secpol.msc # [3] [4] [5] [12]
>>
>> 4. Install postmaster as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> # cygrunsrv --remove postmaster
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> Skip to step 7.
>>
>> B)If you are doing a fresh install:
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> 5. Create the PostgreSQL data directory:
>>
>> # mkdir /usr/share/postgresql/data
>>
>> 6. Change ownership of the PostgreSQL data directory:
>>
>> # chown postgres /usr/share/postgresql/data # [10]
>>
>> 7. Start the cygipc ipc-daemon:
>>
>> # net start ipc-daemon2 # [7]
>>
>> **If upgrading skip to step 9.
>>
>> 8. Initialize PostgreSQL (*when running under the "postgres" account*):
>>
>> $ initdb -D /usr/share/postgresql/data
>>
>> 9. Start postmaster:
>>
>> # net start postmaster # [7]
>>
>> 10. Connect to PostgreSQL:
>>
>> # psql -U postgres template1 # [8] [9]
>>
>> The following are the notes to the above:
>>
-----Original Message-----
From: Bill Pfeiffer [mailto:pfeiffer@arbfile.org]
Sent: Friday, September 26, 2003 12:28 PM
To: Postgresql-Cygwin
Subject: [CYGWIN] ipc-daemon2 fails to run as WinXP service
Reposting to mailing list instread of newsgroup to see if I can get a
response. ipc-daemon2 will not run when
installed using the --install-as-service option. Does ipc-daemon2 write a
log. I didn't see one in the /var/log directory and I'm not sure where
syslog goes in cygipc.
My original post:
------------------
I upgraded to the latest postgresql using ipc-daemon2. I can start both
ipc-daemon2 and postmaster
from the command line, but when I tried to install them as a service,
ipc-daemon2, fails with message:
The ipc-daemon service on Local Computer started then stopped...
I set the ipc_daemon2 up as a service as follows:
cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path
/bin/ipc-daemon2.exe --termsig INT --shutdown
Also tried:
ipc-daemon2 --install-as-service
and this also fails with the same message.
I've tried running the service under Local System account as well as
Administrator accounts with the same error message resulting.
Any ideas?
Bill Pfeiffer
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
----- Original Message -----From: Godshall MichaelSent: Friday, September 26, 2003 1:39 PMSubject: RE: [CYGWIN] ipc-daemon2 fails to run as WinXP serviceMaybe this earlier post will help.
Have you seen the following?
>
> http://www.tishler.net/jason/software/postgresql/postgresql-7.3.4.README
>
>> This is what it should read now:
>>
>> The following is the NT services Cygwin PostgreSQL installation
>> procedure
>> (with footnotes designated by "[n]"):
>>
>> 1. Install the cygipc ipc-daemon as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> shutdown the postmaster and cygipc services.
>> close the service manager screen.
>> # ipc-daemon --remove-as-service
>> # ipc-daemon2 --install-as-service
>>
>> Next skip to step 4.
>>
>> B)If it is a fresh install
>> # ipc-daemon2 --install-as-service
>>
>> 2. Create the "postgres" user account:
>>
>> # net user postgres $password /add /fullname:postgres
>> /comment:'PostgreSQL user account' /homedir:"$(cygpath -w
>> /home/postgres)" # [11]
>> # mkpasswd -l -u postgres >>/etc/passwd
>>
>> 3. Grant the "postgres" user the "Log on as a service" user right:
>>
>> # cmd /c secpol.msc # [3] [4] [5] [12]
>>
>> 4. Install postmaster as a NT service:
>> A)If you are upgrading from a version prior to 7.3.4-2
>> # cygrunsrv --remove postmaster
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> Skip to step 7.
>>
>> B)If you are doing a fresh install:
>> # cygrunsrv --install postmaster --path /usr/bin/postmaster --args
>> "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user
>> postgres --shutdown # [6]
>>
>> 5. Create the PostgreSQL data directory:
>>
>> # mkdir /usr/share/postgresql/data
>>
>> 6. Change ownership of the PostgreSQL data directory:
>>
>> # chown postgres /usr/share/postgresql/data # [10]
>>
>> 7. Start the cygipc ipc-daemon:
>>
>> # net start ipc-daemon2 # [7]
>>
>> **If upgrading skip to step 9.
>>
>> 8. Initialize PostgreSQL (*when running under the "postgres" account*):
>>
>> $ initdb -D /usr/share/postgresql/data
>>
>> 9. Start postmaster:
>>
>> # net start postmaster # [7]
>>
>> 10. Connect to PostgreSQL:
>>
>> # psql -U postgres template1 # [8] [9]
>>
>> The following are the notes to the above:
>>-----Original Message-----
From: Bill Pfeiffer [mailto:pfeiffer@arbfile.org]
Sent: Friday, September 26, 2003 12:28 PM
To: Postgresql-Cygwin
Subject: [CYGWIN] ipc-daemon2 fails to run as WinXP serviceReposting to mailing list instread of newsgroup to see if I can get a
response. ipc-daemon2 will not run when
installed using the --install-as-service option. Does ipc-daemon2 write a
log. I didn't see one in the /var/log directory and I'm not sure where
syslog goes in cygipc.My original post:
------------------I upgraded to the latest postgresql using ipc-daemon2. I can start both
ipc-daemon2 and postmaster
from the command line, but when I tried to install them as a service,
ipc-daemon2, fails with message:The ipc-daemon service on Local Computer started then stopped...
I set the ipc_daemon2 up as a service as follows:
cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path
/bin/ipc-daemon2.exe --termsig INT --shutdownAlso tried:
ipc-daemon2 --install-as-service
and this also fails with the same message.
I've tried running the service under Local System account as well as
Administrator accounts with the same error message resulting.Any ideas?
Bill Pfeiffer
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Bill, On Fri, Sep 26, 2003 at 01:28:29PM -0400, Bill Pfeiffer wrote: > I upgraded to the latest postgresql using ipc-daemon2. I can start > both ipc-daemon2 and postmaster from the command line, What user are you running as above? > but when I tried to install them as a service, ipc-daemon2, fails with > message: > > The ipc-daemon service on Local Computer started then stopped... > > [snip] > > I've tried running the service under Local System account as well as > Administrator accounts with the same error message resulting. > > Any ideas? Anything in the Event Log? You may want to post to the Cygwin list since this is really a Cygwin issue... 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
I thought I had checked this early on, but after looking into it, it turns out I was not using a user with the correct rights. I created a local user with the appropriate rights and the service starts up fine. ----- Original Message ----- From: "Jason Tishler" <jason@tishler.net> To: "Bill Pfeiffer" <pfeiffer@arbfile.org> Cc: "Postgresql-Cygwin" <pgsql-cygwin@postgresql.org> Sent: Friday, September 26, 2003 5:38 PM Subject: Re: [CYGWIN] ipc-daemon2 fails to run as WinXP service > Bill, > > On Fri, Sep 26, 2003 at 01:28:29PM -0400, Bill Pfeiffer wrote: > > I upgraded to the latest postgresql using ipc-daemon2. I can start > > both ipc-daemon2 and postmaster from the command line, > > What user are you running as above? > > > but when I tried to install them as a service, ipc-daemon2, fails with > > message: > > > > The ipc-daemon service on Local Computer started then stopped... > > > > [snip] > > > > I've tried running the service under Local System account as well as > > Administrator accounts with the same error message resulting. > > > > Any ideas? > > Anything in the Event Log? > > You may want to post to the Cygwin list since this is really a Cygwin > issue... > > 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
Bill, On Fri, Sep 26, 2003 at 10:03:25PM -0400, Bill Pfeiffer wrote: > I thought I had checked this early on, but after looking into it, it > turns out I was not using a user with the correct rights. I created a > local user with the appropriate rights and the service starts up fine. Is this XP Home or Pro. If Pro, why not just use the LocalSystem user (i.e., the default)? 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
WinXP Pro. LocalSystem (i.e., default) is what didn't work. ----- Original Message ----- From: "Jason Tishler" <jason@tishler.net> To: "Bill Pfeiffer" <pfeiffer@arbfile.org> Cc: "Postgresql-Cygwin" <pgsql-cygwin@postgresql.org> Sent: Sunday, September 28, 2003 9:41 AM Subject: Re: [CYGWIN] ipc-daemon2 fails to run as WinXP service > Bill, > > On Fri, Sep 26, 2003 at 10:03:25PM -0400, Bill Pfeiffer wrote: > > I thought I had checked this early on, but after looking into it, it > > turns out I was not using a user with the correct rights. I created a > > local user with the appropriate rights and the service starts up fine. > > Is this XP Home or Pro. If Pro, why not just use the LocalSystem user > (i.e., the default)? > > 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
Bill, On Sun, Sep 28, 2003 at 04:19:30PM -0400, Bill Pfeiffer wrote: > WinXP Pro. LocalSystem (i.e., default) is what didn't work. Works for me: $ uname -a CYGWIN_NT-5.1 xptst37 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 ... $ sc qc ipc-daemon2 [SC] GetServiceConfig SUCCESS SERVICE_NAME: ipc-daemon2 TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : "C:\cygwin\bin\ipc-daemon2.exe" "--service" LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : Cygwin IPC Daemon 2 DEPENDENCIES : SERVICE_START_NAME : LocalSystem 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
I ran the same commands you listed and noticed I was on 1.5.4 cygwin. I updated to the latest and now it can log in with the local system account. It appears that solved/removed/hid the problem. Ipc-daemon2 now works as a service using the LocalSystem account. Thanks, Bill ----- Original Message ----- From: "Jason Tishler" <jason@tishler.net> To: "Bill Pfeiffer" <pfeiffer@arbfile.org> Cc: "Postgresql-Cygwin" <pgsql-cygwin@postgresql.org> Sent: Monday, September 29, 2003 7:32 AM Subject: Re: [CYGWIN] ipc-daemon2 fails to run as WinXP service > Bill, > > On Sun, Sep 28, 2003 at 04:19:30PM -0400, Bill Pfeiffer wrote: > > WinXP Pro. LocalSystem (i.e., default) is what didn't work. > > Works for me: > > $ uname -a > CYGWIN_NT-5.1 xptst37 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 ... > > $ sc qc ipc-daemon2 > [SC] GetServiceConfig SUCCESS > > SERVICE_NAME: ipc-daemon2 > TYPE : 10 WIN32_OWN_PROCESS > START_TYPE : 2 AUTO_START > ERROR_CONTROL : 1 NORMAL > BINARY_PATH_NAME : "C:\cygwin\bin\ipc-daemon2.exe" "--service" > LOAD_ORDER_GROUP : > TAG : 0 > DISPLAY_NAME : Cygwin IPC Daemon 2 > DEPENDENCIES : > SERVICE_START_NAME : LocalSystem > > > 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