Обсуждение: postmaster service now fails to start under win2k

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

postmaster service now fails to start under win2k

От
"Brian Babey"
Дата:
Hello!

Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1

I had been running ipc-daemon and postmaster as NT services for about a
month with no problems. I followed the install instructions provided in the
READMEs with Cygwin, installing postmaster to run as an NT service as the
user 'postgres', and running initdb as Administrator since I can't seem to
switch context to postgres.

As I said this has worked fine for me up until a couple days ago after I
installed Service Pack 3. When the machine came up from rebooting,
postmaster did not start, and in the Application Event Log I had this error:

starting service `postmaster' failed: execv: 1, Not owner.


I was unable to manually start the service or use 'net start postmaster', it
just quit with the same message. I looked on the archives here and saw a
recommendation to change the password of the postgres user and reinstall the
service, but I had the same result. The only way I could get it working was
to reinstall the service to run as 'Administrator' and give him privileges
to logon as a service. I'd rather not attach this to the Administrator
account though.

Does anyone know what I could be doing wrong? I tend to think either the
reboot after SP3 didn't shut down the service gracefully or maybe there was
security update in the service pack that finally enforced the discrepancy in
ownership between the /usr/share/postgresql/data directory (Administrator)
and the service (postgres). Regardless, I would appreciate any help or
advice on this problem!


Thanks in advance,


Brian


Re: postmaster service now fails to start under win2k

От
"Jean-Marc Paulin"
Дата:
if I remember well, pgsql creates a postmaster.pid file that you may need to
remove before you can restart pgsql.

HTH

JM


----- Original Message -----
From: "Brian Babey" <bbabey@openroadsconsulting.com>
To: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
Sent: Friday, August 09, 2002 8:02 PM
Subject: [CYGWIN] postmaster service now fails to start under win2k


> Hello!
>
> Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1
>
> I had been running ipc-daemon and postmaster as NT services for about a
> month with no problems. I followed the install instructions provided in
the
> READMEs with Cygwin, installing postmaster to run as an NT service as the
> user 'postgres', and running initdb as Administrator since I can't seem to
> switch context to postgres.
>
> As I said this has worked fine for me up until a couple days ago after I
> installed Service Pack 3. When the machine came up from rebooting,
> postmaster did not start, and in the Application Event Log I had this
error:
>
> starting service `postmaster' failed: execv: 1, Not owner.
>
>
> I was unable to manually start the service or use 'net start postmaster',
it
> just quit with the same message. I looked on the archives here and saw a
> recommendation to change the password of the postgres user and reinstall
the
> service, but I had the same result. The only way I could get it working
was
> to reinstall the service to run as 'Administrator' and give him privileges
> to logon as a service. I'd rather not attach this to the Administrator
> account though.
>
> Does anyone know what I could be doing wrong? I tend to think either the
> reboot after SP3 didn't shut down the service gracefully or maybe there
was
> security update in the service pack that finally enforced the discrepancy
in
> ownership between the /usr/share/postgresql/data directory (Administrator)
> and the service (postgres). Regardless, I would appreciate any help or
> advice on this problem!
>
>
> Thanks in advance,
>
>
> Brian
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


Re: postmaster service now fails to start under win2k

От
"Brian Babey"
Дата:
Jean-Marc,

Thanks for the suggestion, but the .pid file doesn't appear to be the
problem. While the service is running (as Administrator), postmaster.pid is
there, and when I stop the service, it goes away. I can then start the
service back up again as Administrator and it runs fine, but when I try to
install it to run as 'postgres' it will not start at all.

Any other ideas?

-Brian


----- Original Message -----
From: "Jean-Marc Paulin" <jmp@micromuse.com>
To: "Brian Babey" <bbabey@openroadsconsulting.com>; "pgsql-cygwin"
<pgsql-cygwin@postgresql.org>
Sent: Monday, August 12, 2002 4:12 AM
Subject: Re: [CYGWIN] postmaster service now fails to start under win2k


> if I remember well, pgsql creates a postmaster.pid file that you may need
to
> remove before you can restart pgsql.
>
> HTH
>
> JM
>
>
> ----- Original Message -----
> From: "Brian Babey" <bbabey@openroadsconsulting.com>
> To: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> Sent: Friday, August 09, 2002 8:02 PM
> Subject: [CYGWIN] postmaster service now fails to start under win2k
>
>
> > Hello!
> >
> > Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1
> >
> > I had been running ipc-daemon and postmaster as NT services for about a
> > month with no problems. I followed the install instructions provided in
> the
> > READMEs with Cygwin, installing postmaster to run as an NT service as
the
> > user 'postgres', and running initdb as Administrator since I can't seem
to
> > switch context to postgres.
> >
> > As I said this has worked fine for me up until a couple days ago after I
> > installed Service Pack 3. When the machine came up from rebooting,
> > postmaster did not start, and in the Application Event Log I had this
> error:
> >
> > starting service `postmaster' failed: execv: 1, Not owner.
> >
> >
> > I was unable to manually start the service or use 'net start
postmaster',
> it
> > just quit with the same message. I looked on the archives here and saw a
> > recommendation to change the password of the postgres user and reinstall
> the
> > service, but I had the same result. The only way I could get it working
> was
> > to reinstall the service to run as 'Administrator' and give him
privileges
> > to logon as a service. I'd rather not attach this to the Administrator
> > account though.
> >
> > Does anyone know what I could be doing wrong? I tend to think either the
> > reboot after SP3 didn't shut down the service gracefully or maybe there
> was
> > security update in the service pack that finally enforced the
discrepancy
> in
> > ownership between the /usr/share/postgresql/data directory
(Administrator)
> > and the service (postgres). Regardless, I would appreciate any help or
> > advice on this problem!
> >
> >
> > Thanks in advance,
> >
> >
> > Brian
> >



Re: postmaster service now fails to start under win2k

От
"Dave Page"
Дата:
Does your postgres user have read/write permissions on your data
directory?

Regards, Dave.

> -----Original Message-----
> From: Brian Babey [mailto:bbabey@openroadsconsulting.com]
> Sent: 12 August 2002 15:22
> To: Jean-Marc Paulin; pgsql-cygwin
> Subject: Re: [CYGWIN] postmaster service now fails to start
> under win2k
>
>
> Jean-Marc,
>
> Thanks for the suggestion, but the .pid file doesn't appear
> to be the problem. While the service is running (as
> Administrator), postmaster.pid is there, and when I stop the
> service, it goes away. I can then start the service back up
> again as Administrator and it runs fine, but when I try to
> install it to run as 'postgres' it will not start at all.
>
> Any other ideas?
>
> -Brian
>
>
> ----- Original Message -----
> From: "Jean-Marc Paulin" <jmp@micromuse.com>
> To: "Brian Babey" <bbabey@openroadsconsulting.com>;
> "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> Sent: Monday, August 12, 2002 4:12 AM
> Subject: Re: [CYGWIN] postmaster service now fails to start
> under win2k
>
>
> > if I remember well, pgsql creates a postmaster.pid file
> that you may
> > need
> to
> > remove before you can restart pgsql.
> >
> > HTH
> >
> > JM
> >
> >
> > ----- Original Message -----
> > From: "Brian Babey" <bbabey@openroadsconsulting.com>
> > To: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> > Sent: Friday, August 09, 2002 8:02 PM
> > Subject: [CYGWIN] postmaster service now fails to start under win2k
> >
> >
> > > Hello!
> > >
> > > Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1
> > >
> > > I had been running ipc-daemon and postmaster as NT services for
> > > about a month with no problems. I followed the install
> instructions
> > > provided in
> > the
> > > READMEs with Cygwin, installing postmaster to run as an
> NT service
> > > as
> the
> > > user 'postgres', and running initdb as Administrator
> since I can't
> > > seem
> to
> > > switch context to postgres.
> > >
> > > As I said this has worked fine for me up until a couple days ago
> > > after I installed Service Pack 3. When the machine came up from
> > > rebooting, postmaster did not start, and in the Application Event
> > > Log I had this
> > error:
> > >
> > > starting service `postmaster' failed: execv: 1, Not owner.
> > >
> > >
> > > I was unable to manually start the service or use 'net start
> postmaster',
> > it
> > > just quit with the same message. I looked on the archives
> here and
> > > saw a recommendation to change the password of the
> postgres user and
> > > reinstall
> > the
> > > service, but I had the same result. The only way I could get it
> > > working
> > was
> > > to reinstall the service to run as 'Administrator' and give him
> privileges
> > > to logon as a service. I'd rather not attach this to the
> > > Administrator account though.
> > >
> > > Does anyone know what I could be doing wrong? I tend to
> think either
> > > the reboot after SP3 didn't shut down the service gracefully or
> > > maybe there
> > was
> > > security update in the service pack that finally enforced the
> discrepancy
> > in
> > > ownership between the /usr/share/postgresql/data directory
> (Administrator)
> > > and the service (postgres). Regardless, I would
> appreciate any help
> > > or advice on this problem!
> > >
> > >
> > > Thanks in advance,
> > >
> > >
> > > Brian
> > >
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

Re: postmaster service now fails to start under win2k

От
Cedric Dufour (Cogito Ergo Soft)
Дата:
Hello Brian,

Have you tried starting your service using "cygrunsrv ... --stderr <your log
file>" (where <your log file> is any file where the user launching the
service can read/write) ? There is much useful information about why
postmaster would fail starting is this file (such as directory permission
errors, lock file errors, and so on).

Hope it might help.

    Cedric Dufour

> -----Original Message-----
> From: pgsql-cygwin-owner@postgresql.org
> [mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of Dave Page
> Sent: Monday, August 12, 2002 16:25
> To: Brian Babey; Jean-Marc Paulin; pgsql-cygwin
> Subject: Re: [CYGWIN] postmaster service now fails to start under win2k
>
>
> Does your postgres user have read/write permissions on your data
> directory?
>
> Regards, Dave.
>
> > -----Original Message-----
> > From: Brian Babey [mailto:bbabey@openroadsconsulting.com]
> > Sent: 12 August 2002 15:22
> > To: Jean-Marc Paulin; pgsql-cygwin
> > Subject: Re: [CYGWIN] postmaster service now fails to start
> > under win2k
> >
> >
> > Jean-Marc,
> >
> > Thanks for the suggestion, but the .pid file doesn't appear
> > to be the problem. While the service is running (as
> > Administrator), postmaster.pid is there, and when I stop the
> > service, it goes away. I can then start the service back up
> > again as Administrator and it runs fine, but when I try to
> > install it to run as 'postgres' it will not start at all.
> >
> > Any other ideas?
> >
> > -Brian
> >
> >
> > ----- Original Message -----
> > From: "Jean-Marc Paulin" <jmp@micromuse.com>
> > To: "Brian Babey" <bbabey@openroadsconsulting.com>;
> > "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> > Sent: Monday, August 12, 2002 4:12 AM
> > Subject: Re: [CYGWIN] postmaster service now fails to start
> > under win2k
> >
> >
> > > if I remember well, pgsql creates a postmaster.pid file
> > that you may
> > > need
> > to
> > > remove before you can restart pgsql.
> > >
> > > HTH
> > >
> > > JM
> > >
> > >
> > > ----- Original Message -----
> > > From: "Brian Babey" <bbabey@openroadsconsulting.com>
> > > To: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> > > Sent: Friday, August 09, 2002 8:02 PM
> > > Subject: [CYGWIN] postmaster service now fails to start under win2k
> > >
> > >
> > > > Hello!
> > > >
> > > > Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1
> > > >
> > > > I had been running ipc-daemon and postmaster as NT services for
> > > > about a month with no problems. I followed the install
> > instructions
> > > > provided in
> > > the
> > > > READMEs with Cygwin, installing postmaster to run as an
> > NT service
> > > > as
> > the
> > > > user 'postgres', and running initdb as Administrator
> > since I can't
> > > > seem
> > to
> > > > switch context to postgres.
> > > >
> > > > As I said this has worked fine for me up until a couple days ago
> > > > after I installed Service Pack 3. When the machine came up from
> > > > rebooting, postmaster did not start, and in the Application Event
> > > > Log I had this
> > > error:
> > > >
> > > > starting service `postmaster' failed: execv: 1, Not owner.
> > > >
> > > >
> > > > I was unable to manually start the service or use 'net start
> > postmaster',
> > > it
> > > > just quit with the same message. I looked on the archives
> > here and
> > > > saw a recommendation to change the password of the
> > postgres user and
> > > > reinstall
> > > the
> > > > service, but I had the same result. The only way I could get it
> > > > working
> > > was
> > > > to reinstall the service to run as 'Administrator' and give him
> > privileges
> > > > to logon as a service. I'd rather not attach this to the
> > > > Administrator account though.
> > > >
> > > > Does anyone know what I could be doing wrong? I tend to
> > think either
> > > > the reboot after SP3 didn't shut down the service gracefully or
> > > > maybe there
> > > was
> > > > security update in the service pack that finally enforced the
> > discrepancy
> > > in
> > > > ownership between the /usr/share/postgresql/data directory
> > (Administrator)
> > > > and the service (postgres). Regardless, I would
> > appreciate any help
> > > > or advice on this problem!
> > > >
> > > >
> > > > Thanks in advance,
> > > >
> > > >
> > > > Brian
> > > >
> >
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>



Re: postmaster service now fails to start under win2k

От
"Brian Babey"
Дата:
Hey guys,

Thank you for all your help so far, I really appreciate it, still a few
problems though +). As for the permissions to the data directory (thanks
Dave), I had been setting them with chown, and apparently this was not
working properly. When I tried out your suggestion for logging Cedric, the
log file immediately showed a Permission denied error, which I fixed by
logging into windows as the postgres user and then running initdb to create
the data dirs.

Now that I have this logfile to browse, I am yet again confused as to the
behavior of the postmaster service. With everything set up to run as
Administrator, I have no errors still, but when I set up for postgres, the
service will not start and the log reads as follows (I apologize for the
longishness of the text):
--
$ cat /home/postgres/err.log
IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough
memory

This error usually means that PostgreSQL's request for a shared
memory segment exceeded available memory or swap space.
To reduce the request size (currently 1441792 bytes), reduce
PostgreSQL's shared_buffers parameter (currently 64) and/or
its max_connections parameter (currently 32).

The PostgreSQL Administrator's Guide contains more information about
shared memory configuration.
--
I checked out the Administrator's Guide on the web and I didn't see anything
very clear relating to Cygwin on this topic; is there anything important
there that I'm missing? Regardless, I'm confused as to why a system resource
problem would affect one user running a process but not another.


Brian

----- Original Message -----
From: "Cedric Dufour (Cogito Ergo Soft)"
<cedric.dufour@cogito-ergo-soft.com>
To: "Brian Babey" <bbabey@openroadsconsulting.com>; "pgsql-cygwin"
<pgsql-cygwin@postgresql.org>
Sent: Monday, August 12, 2002 10:44 AM
Subject: RE: [CYGWIN] postmaster service now fails to start under win2k


> Hello Brian,
>
> Have you tried starting your service using "cygrunsrv ... --stderr <your
log
> file>" (where <your log file> is any file where the user launching the
> service can read/write) ? There is much useful information about why
> postmaster would fail starting is this file (such as directory permission
> errors, lock file errors, and so on).
>
> Hope it might help.
>
> Cedric Dufour
>
> > -----Original Message-----
> > From: pgsql-cygwin-owner@postgresql.org
> > [mailto:pgsql-cygwin-owner@postgresql.org]On Behalf Of Dave Page
> > Sent: Monday, August 12, 2002 16:25
> > To: Brian Babey; Jean-Marc Paulin; pgsql-cygwin
> > Subject: Re: [CYGWIN] postmaster service now fails to start under win2k
> >
> >
> > Does your postgres user have read/write permissions on your data
> > directory?
> >
> > Regards, Dave.
> >
> > > -----Original Message-----
> > > From: Brian Babey [mailto:bbabey@openroadsconsulting.com]
> > > Sent: 12 August 2002 15:22
> > > To: Jean-Marc Paulin; pgsql-cygwin
> > > Subject: Re: [CYGWIN] postmaster service now fails to start
> > > under win2k
> > >
> > >
> > > Jean-Marc,
> > >
> > > Thanks for the suggestion, but the .pid file doesn't appear
> > > to be the problem. While the service is running (as
> > > Administrator), postmaster.pid is there, and when I stop the
> > > service, it goes away. I can then start the service back up
> > > again as Administrator and it runs fine, but when I try to
> > > install it to run as 'postgres' it will not start at all.
> > >
> > > Any other ideas?
> > >
> > > -Brian
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jean-Marc Paulin" <jmp@micromuse.com>
> > > To: "Brian Babey" <bbabey@openroadsconsulting.com>;
> > > "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> > > Sent: Monday, August 12, 2002 4:12 AM
> > > Subject: Re: [CYGWIN] postmaster service now fails to start
> > > under win2k
> > >
> > >
> > > > if I remember well, pgsql creates a postmaster.pid file
> > > that you may
> > > > need
> > > to
> > > > remove before you can restart pgsql.
> > > >
> > > > HTH
> > > >
> > > > JM
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Brian Babey" <bbabey@openroadsconsulting.com>
> > > > To: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
> > > > Sent: Friday, August 09, 2002 8:02 PM
> > > > Subject: [CYGWIN] postmaster service now fails to start under win2k
> > > >
> > > >
> > > > > Hello!
> > > > >
> > > > > Background: Cygwin 1.3.10(0.51/3/2), PostgreSQL 7.2.1
> > > > >
> > > > > I had been running ipc-daemon and postmaster as NT services for
> > > > > about a month with no problems. I followed the install
> > > instructions
> > > > > provided in
> > > > the
> > > > > READMEs with Cygwin, installing postmaster to run as an
> > > NT service
> > > > > as
> > > the
> > > > > user 'postgres', and running initdb as Administrator
> > > since I can't
> > > > > seem
> > > to
> > > > > switch context to postgres.
> > > > >
> > > > > As I said this has worked fine for me up until a couple days ago
> > > > > after I installed Service Pack 3. When the machine came up from
> > > > > rebooting, postmaster did not start, and in the Application Event
> > > > > Log I had this
> > > > error:
> > > > >
> > > > > starting service `postmaster' failed: execv: 1, Not owner.
> > > > >
> > > > >
> > > > > I was unable to manually start the service or use 'net start
> > > postmaster',
> > > > it
> > > > > just quit with the same message. I looked on the archives
> > > here and
> > > > > saw a recommendation to change the password of the
> > > postgres user and
> > > > > reinstall
> > > > the
> > > > > service, but I had the same result. The only way I could get it
> > > > > working
> > > > was
> > > > > to reinstall the service to run as 'Administrator' and give him
> > > privileges
> > > > > to logon as a service. I'd rather not attach this to the
> > > > > Administrator account though.
> > > > >
> > > > > Does anyone know what I could be doing wrong? I tend to
> > > think either
> > > > > the reboot after SP3 didn't shut down the service gracefully or
> > > > > maybe there
> > > > was
> > > > > security update in the service pack that finally enforced the
> > > discrepancy
> > > > in
> > > > > ownership between the /usr/share/postgresql/data directory
> > > (Administrator)
> > > > > and the service (postgres). Regardless, I would
> > > appreciate any help
> > > > > or advice on this problem!
> > > > >
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > >
> > > > > Brian
> > > > >



Re: postmaster service now fails to start under win2k

От
fred@ontosys.com
Дата:
On Mon, Aug 12, 2002 at 01:08:51PM -0400, Brian Babey wrote:
> IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough
> memory

I've seen something like that when running ipc-daemon as different
users at different times.  You might try removing the /tmp/Multi* and
/tmp/cygipc* files while ipc-daemon is stopped.

--
Fred Yankowski      fred@ontosys.com           tel: +1.630.879.1312
OntoSys, Inc        PGP keyID: 7B449345        fax: +1.630.879.1370
www.ontosys.com     38W242 Deerpath Rd, Batavia, IL 60510-9461, USA

Re: postmaster service now fails to start under win2k

От
"Brian Babey"
Дата:
Much thanks, Fred, that seems to have solved my problem! I shut down
ipc-daemon and wiped tmp, and then both services started up successfully.

Thanks again everyone for all your help!

-Brian

----- Original Message -----
From: <fred@ontosys.com>
To: "Brian Babey" <bbabey@openroadsconsulting.com>
Cc: "pgsql-cygwin" <pgsql-cygwin@postgresql.org>
Sent: Monday, August 12, 2002 2:47 PM
Subject: Re: [CYGWIN] postmaster service now fails to start under win2k


> On Mon, Aug 12, 2002 at 01:08:51PM -0400, Brian Babey wrote:
> > IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not
enough
> > memory
>
> I've seen something like that when running ipc-daemon as different
> users at different times.  You might try removing the /tmp/Multi* and
> /tmp/cygipc* files while ipc-daemon is stopped.
>
> --
> Fred Yankowski      fred@ontosys.com           tel: +1.630.879.1312
> OntoSys, Inc     PGP keyID: 7B449345        fax: +1.630.879.1370
> www.ontosys.com     38W242 Deerpath Rd, Batavia, IL 60510-9461, USA