Обсуждение: Trouble starting ipc-daemon as a service

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

Trouble starting ipc-daemon as a service

От
"Dave Steenburg"
Дата:
I'm running on Windows XP Home version, using Cygwin 1.3.14-1, PostgreSQL 7.2.3, and the ipc-daemon in Cygipc 1.11-1.  I have followed the instructions in usr/doc/Cygwin/postgresql-7.2.3.README.  I put it into a small script file that looks like:
 
    ipc-daemon --install-as-service
    cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
    mkdir /usr/share/postgresql/data
    chown postgres /usr/share/postgresql/data
    initdb -D /usr/share/postgresql/data
    net start ipc-daemon
    net start postmaster
 
 Yet when the script gets to "net start ipc-daemon" I get the message:
    The Cygwin IPC Daemon service is starting.
    The Cygwin IPC Daemon service could not be started.
    
So, of course, the postmaster service also failed.  When I tried going through the Service Manager to start ipc-daemon, it said the service on Local System "started then stopped" and suggested "Some services stop automatically if they have no work to do"   
 
Can anyone suggest what I might be doing wrong?
 
Dave

Re: Trouble starting ipc-daemon as a service

От
"Vincent Hikida"
Дата:
This probably isn't your problem. However, if you have a program running called "Freedom" which prevents advertisements in your browser, make sure it is not running. Freedom caused a couple of us with XP home to have problems with pgsql.
 
 
Vincent Hikida,
Member of Technical Staff - Urbana Software, Inc.
"A Personalized Learning Experience"
 
----- Original Message -----
Sent: Tuesday, June 10, 2003 1:20 PM
Subject: [CYGWIN] Trouble starting ipc-daemon as a service

I'm running on Windows XP Home version, using Cygwin 1.3.14-1, PostgreSQL 7.2.3, and the ipc-daemon in Cygipc 1.11-1.  I have followed the instructions in usr/doc/Cygwin/postgresql-7.2.3.README.  I put it into a small script file that looks like:
 
    ipc-daemon --install-as-service
    cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
    mkdir /usr/share/postgresql/data
    chown postgres /usr/share/postgresql/data
    initdb -D /usr/share/postgresql/data
    net start ipc-daemon
    net start postmaster
 
 Yet when the script gets to "net start ipc-daemon" I get the message:
    The Cygwin IPC Daemon service is starting.
    The Cygwin IPC Daemon service could not be started.
    
So, of course, the postmaster service also failed.  When I tried going through the Service Manager to start ipc-daemon, it said the service on Local System "started then stopped" and suggested "Some services stop automatically if they have no work to do"   
 
Can anyone suggest what I might be doing wrong?
 
Dave

Re: Trouble starting ipc-daemon as a service

От
"Dave Steenburg"
Дата:
Good question!  Yet I suspect if it were a permissions issue the service would not first start and then stop.  I would expect some kind of request denied message.  Still, I won't throw out any possibilities at this point.  With the XP Home version I'm not sure how I would find out.  The account has admin privileges but I don't know how I would get more detailed info about what that includes.  (I knew how to do it on NT but this XP is more automated, and I don't know how to get behind the curtain)  So, do you know how
 
As I write this, I re-installed the IPC daemon as a service to see how I might get more details about the error message, and now it works!  I don't know if it makes a difference that this time I installed it from the Cygwin prompt rather than from a batch file. 
 
But now the problem has shifted.  Now when I try to start the postmaster service, it returns a system error 1069: "The service did not start due to a logon error."  I am logged on as "postgres" (an admin account) and in the Service Manager it shows "Log on as .\postgres" so I'm not sure where the problem comes from.  Any ideas. 
-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: June 10, 2003 4:22 PM
To: 'Dave Steenburg'
Subject: RE: [CYGWIN] Trouble starting ipc-daemon as a service

Does the postgres local user account have permission to start and stop services
-----Original Message-----
From: Dave Steenburg [mailto:dsteenburg@rogers.com]
Sent: Tuesday, June 10, 2003 3:20 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] Trouble starting ipc-daemon as a service

I'm running on Windows XP Home version, using Cygwin 1.3.14-1, PostgreSQL 7.2.3, and the ipc-daemon in Cygipc 1.11-1.  I have followed the instructions in usr/doc/Cygwin/postgresql-7.2.3.README.  I put it into a small script file that looks like:
 
    ipc-daemon --install-as-service
    cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
    mkdir /usr/share/postgresql/data
    chown postgres /usr/share/postgresql/data
    initdb -D /usr/share/postgresql/data
    net start ipc-daemon
    net start postmaster
 
 Yet when the script gets to "net start ipc-daemon" I get the message:
    The Cygwin IPC Daemon service is starting.
    The Cygwin IPC Daemon service could not be started.
    
So, of course, the postmaster service also failed.  When I tried going through the Service Manager to start ipc-daemon, it said the service on Local System "started then stopped" and suggested "Some services stop automatically if they have no work to do"   
 
Can anyone suggest what I might be doing wrong?
 
Dave

Re: Trouble starting ipc-daemon as a service

От
"Dave Steenburg"
Дата:
That solved it!  When I changed the properties of the service, changing the password of the user account to run the service, it responded by granting "postgres" the right to log on as a service.  So this must be a uniquely XP quirk.  
 
Thanks for your help, Mike!
 
Dave
-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: June 10, 2003 5:36 PM
To: 'Dave Steenburg'
Subject: RE: [CYGWIN] Trouble starting ipc-daemon as a service

My 2000 machine always shows the login as .\XXXXX  I think that windows is truncating the domain name with the .\
 
If the logon is failing I would go intothe service properties and re-enter the password for the postgres account.  Reinstalling the service probably recreated the postrges user account. 
 
Mike
 = -----Original Message-----
From: Dave Steenburg [mailto:dsteenburg@rogers.com]
Sent: Tuesday, June 10, 2003 4:22 PM
To: pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] Trouble starting ipc-daemon as a service

Good question!  Yet I suspect if it were a permissions issue the service would not first start and then stop.  I would expect some kind of request denied message.  Still, I won't throw out any possibilities at this point.  With the XP Home version I'm not sure how I would find out.  The account has admin privileges but I don't know how I would get more detailed info about what that includes.  (I knew how to do it on NT but this XP is more automated, and I don't know how to get behind the curtain)  So, do you know how
 
As I write this, I re-installed the IPC daemon as a service to see how I might get more details about the error message, and now it works!  I don't know if it makes a difference that this time I installed it from the Cygwin prompt rather than from a batch file. 
 
But now the problem has shifted.  Now when I try to start the postmaster service, it returns a system error 1069: "The service did not start due to a logon error."  I am logged on as "postgres" (an admin account) and in the Service Manager it shows "Log on as .\postgres" so I'm not sure where the problem comes from.  Any ideas. 
-----Original Message-----
From: Godshall Michael [mailto:Michael_Godshall@gmachs.com]
Sent: June 10, 2003 4:22 PM
To: 'Dave Steenburg'
Subject: RE: [CYGWIN] Trouble starting ipc-daemon as a service

Does the postgres local user account have permission to start and stop services
-----Original Message-----
From: Dave Steenburg [mailto:dsteenburg@rogers.com]
Sent: Tuesday, June 10, 2003 3:20 PM
To: pgsql-cygwin@postgresql.org
Subject: [CYGWIN] Trouble starting ipc-daemon as a service

I'm running on Windows XP Home version, using Cygwin 1.3.14-1, PostgreSQL 7.2.3, and the ipc-daemon in Cygipc 1.11-1.  I have followed the instructions in usr/doc/Cygwin/postgresql-7.2.3.README.  I put it into a small script file that looks like:
 
    ipc-daemon --install-as-service
    cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown
    mkdir /usr/share/postgresql/data
    chown postgres /usr/share/postgresql/data
    initdb -D /usr/share/postgresql/data
    net start ipc-daemon
    net start postmaster
 
 Yet when the script gets to "net start ipc-daemon" I get the message:
    The Cygwin IPC Daemon service is starting.
    The Cygwin IPC Daemon service could not be started.
    
So, of course, the postmaster service also failed.  When I tried going through the Service Manager to start ipc-daemon, it said the service on Local System "started then stopped" and suggested "Some services stop automatically if they have no work to do"   
 
Can anyone suggest what I might be doing wrong?
 
Dave

Re: Trouble starting ipc-daemon as a service

От
Jason Tishler
Дата:
Dave,

On Tue, Jun 10, 2003 at 05:22:03PM -0400, Dave Steenburg wrote:
> But now the problem has shifted.  Now when I try to start the
> postmaster service, it returns a system error 1069: "The service did
> not start due to a logon error."  I am logged on as "postgres" (an
> admin account) and in the Service Manager it shows "Log on as
> .\postgres" so I'm not sure where the problem comes from.  Any ideas.

See the README:

    http://www.tishler.net/jason/software/postgresql/postgresql-7.3.3.README

Specifically, the following:

    3. Grant the "postgres" user the "Log on as a service" user right:

        # cmd /c secpol.msc # [3] [4] [5] [12]

    [snip]

    [12] On Windows XP Home, there is no built in way to assign user
    rights -- use ntrights instead.  This tool is available from the
    Windows 2000 Resource Kit or
    http://www.dynawell.com/reskit/microsoft/win2000/ntrights.zip.

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

Re: Trouble starting ipc-daemon as a service

От
"Dave Steenburg"
Дата:
Thanks for the info, Jason.

Though I had managed to change the user permissions indirectly through
Service Manager, I was interested in the ntrights tool as something that
might help in automating the install process I am working on.  When I look
at the command options, however, I'm not sure there is an option
corresponding to "Log on as a service":  here are the options given in the
command help for ntrights:

NTRights.Exe - Beta Version by Georg Zanzen
Grants/Revokes NT-Rights to a user/group
usage: -u xxx  User/Group
       -m \\xxx  machine to perform the operation on (default local machine)
       -e xxxxx Add xxxxx to the event log
       -r xxx  revokes the xxx right
       +r xxx  grants the xxx right
valid NTRights are:
  SeCreateTokenPrivilege
  SeAssignPrimaryTokenPrivilege
  SeLockMemoryPrivilege
  SeIncreaseQuotaPrivilege
  SeUnsolicitedInputPrivilege
  SeMachineAccountPrivilege
  SeTcbPrivilege
  SeSecurityPrivilege
  SeTakeOwnershipPrivilege
  SeLoadDriverPrivilege
  SeSystemProfilePrivilege
  SeSystemtimePrivilege
  SeProfileSingleProcessPrivilege
  SeIncreaseBasePriorityPrivilege
  SeCreatePagefilePrivilege
  SeCreatePermanentPrivilege
  SeBackupPrivilege
  SeRestorePrivilege
  SeShutdownPrivilege
  SeAuditPrivilege
  SeSystemEnvironmentPrivilege
  SeChangeNotifyPrivilege
  SeRemoteShutdownPrivilege

Does one of these cover permissions to "Log on as a service" ?

Dave


-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: June 11, 2003 11:20 AM
To: Dave Steenburg
Cc: pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] Trouble starting ipc-daemon as a service


Dave,

On Tue, Jun 10, 2003 at 05:22:03PM -0400, Dave Steenburg wrote:
> But now the problem has shifted.  Now when I try to start the
> postmaster service, it returns a system error 1069: "The service did
> not start due to a logon error."  I am logged on as "postgres" (an
> admin account) and in the Service Manager it shows "Log on as
> .\postgres" so I'm not sure where the problem comes from.  Any ideas.

See the README:

    http://www.tishler.net/jason/software/postgresql/postgresql-7.3.3.README

Specifically, the following:

    3. Grant the "postgres" user the "Log on as a service" user right:

        # cmd /c secpol.msc # [3] [4] [5] [12]

    [snip]

    [12] On Windows XP Home, there is no built in way to assign user
    rights -- use ntrights instead.  This tool is available from the
    Windows 2000 Resource Kit or
    http://www.dynawell.com/reskit/microsoft/win2000/ntrights.zip.

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



Re: Trouble starting ipc-daemon as a service

От
Jason Tishler
Дата:
Dave,

On Wed, Jun 11, 2003 at 12:44:14PM -0400, Dave Steenburg wrote:
> Thanks for the info, Jason.

You are welcome.

> Does one of these cover permissions to "Log on as a service" ?

No, see the following:

    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=Log++service+ntrights

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

Re: Trouble starting ipc-daemon as a service

От
"Dave Steenburg"
Дата:
Excellent!  Thanks, Jason.

So, for those interested the command is:

    ntrights -u postgres +r SeServiceLogonRight

Dave


-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: June 11, 2003 2:52 PM
To: Dave Steenburg
Cc: pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] Trouble starting ipc-daemon as a service

<snip>

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=Log++service+ntrights

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