Re: can't start postmaster as service

Lists: pgsql-cygwin
From: Christian Strobl <ch_strobl(at)yahoo(dot)de>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: can't start postmaster as service
Date: 2003-02-13 18:58:51
Message-ID: 20030213185851.94714.qmail@web40611.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

hallo together,

i wanted to start postgres at win2000 as service with
the following commands:

1) cygrunsrv --install postmaster --path
/usr/bin/postmaster --args "-

2)cygrunsrv -S ipc-daemon

3) D /usr/share/postgresql/data -i" --dep ipc-daemon
--termsig INT --user postgres --shutdown

4) cygrunsrv -S postmaster

BUT at the last command i get the follwing
error-message:
cygrunsrv: Error starting a service:
QueryServiceStatus: Win32 error 1062:
Der Dienst wurde nicht gestartet (= the service failed
to start).

maybe somebody can help me.
greetings from munich
christian

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Bis zu 100 MB Speicher bei http://premiummail.yahoo.de


From: Jason Tishler <jason(at)tishler(dot)net>
To: Christian Strobl <ch_strobl(at)yahoo(dot)de>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: can't start postmaster as service
Date: 2003-02-14 12:54:48
Message-ID: 20030214125448.GC1916@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Christian,

On Thu, Feb 13, 2003 at 07:58:51PM +0100, Christian Strobl wrote:
> i wanted to start postgres at win2000 as service with
> the following commands:
>
> 1) cygrunsrv --install postmaster --path
> /usr/bin/postmaster --args "-
>
> 2)cygrunsrv -S ipc-daemon
>
> 3) D /usr/share/postgresql/data -i" --dep ipc-daemon
> --termsig INT --user postgres --shutdown
>
> 4) cygrunsrv -S postmaster

I hope that you really executed the following:

$ 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
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmaster

> BUT at the last command i get the follwing error-message:
> cygrunsrv: Error starting a service:
> QueryServiceStatus: Win32 error 1062:

Note the following:

$ fgrep 1062 /usr/include/w32api/winerror.h
#define ERROR_SERVICE_NOT_ACTIVE 1062L

which is not good. :.)

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


From: "Andy Lowe" <andyl(at)dmetrix(dot)com>
To: "'Jason Tishler'" <jason(at)tishler(dot)net>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: can't start postmaster as service
Date: 2003-03-05 16:54:16
Message-ID: 000001c2e337$e76ef430$c201a8c0@andy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

This is the exact behavior I'm seeing, using 7.3.2. I followed the
steps in the README for installing everything, with the exception of the
data directory, which is slightly different. My data dir does show up
as
drwx------+ 2 postgres None 0 Mar 4 19:00 pgdata
So, I'm guessing that it's not a permissions issue. I'm able to start
postmaster from the command line as the postgres user. The service just
fails to start, giving error 1062. As you noted below, this is not
good. Is there a known cause for this error and (hopefully) a solution?

Andy

-----Original Message-----
From: pgsql-cygwin-owner(at)postgresql(dot)org
[mailto:pgsql-cygwin-owner(at)postgresql(dot)org] On Behalf Of Jason Tishler
Sent: Friday, February 14, 2003 5:55 AM
To: Christian Strobl
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [CYGWIN] can't start postmaster as service

Christian,

On Thu, Feb 13, 2003 at 07:58:51PM +0100, Christian Strobl wrote:
> i wanted to start postgres at win2000 as service with
> the following commands:
>
> 1) cygrunsrv --install postmaster --path
> /usr/bin/postmaster --args "-
>
> 2)cygrunsrv -S ipc-daemon
>
> 3) D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT
> --user postgres --shutdown
>
> 4) cygrunsrv -S postmaster

I hope that you really executed the following:

$ 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
$ cygrunsrv -S ipc-daemon # actually this step is optional
$ cygrunsrv -S postmaster

> BUT at the last command i get the follwing error-message:
> cygrunsrv: Error starting a service:
> QueryServiceStatus: Win32 error 1062:

Note the following:

$ fgrep 1062 /usr/include/w32api/winerror.h
#define ERROR_SERVICE_NOT_ACTIVE 1062L

which is not good. :.)

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


From: Jason Tishler <jason(at)tishler(dot)net>
To: Andy Lowe <andyl(at)dmetrix(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: can't start postmaster as service
Date: 2003-03-06 16:24:09
Message-ID: 20030306162409.GG2008@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Andy,

On Wed, Mar 05, 2003 at 09:54:16AM -0700, Andy Lowe wrote:
> This is the exact behavior I'm seeing, using 7.3.2. I followed the
> steps in the README for installing everything, with the exception of
> the data directory, which is slightly different. My data dir does
> show up as
> drwx------+ 2 postgres None 0 Mar 4 19:00 pgdata

The above looks fine -- the name is just "pgdata" instead of the more
conventional "data".

> So, I'm guessing that it's not a permissions issue.

Sounds reasonable.

> I'm able to start postmaster from the command line as the postgres
> user. The service just fails to start, giving error 1062. As you
> noted below, this is not good. Is there a known cause for this error
> and (hopefully) a solution?

Do you see anything interesting in /var/log/postmaster.log? In the NT
Event Log?

Did you do the following (from the README)?

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

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


From: "Andy Lowe" <andyl(at)dmetrix(dot)com>
To: "'Jason Tishler'" <jason(at)tishler(dot)net>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: can't start postmaster as service
Date: 2003-03-06 17:08:51
Message-ID: 000601c2e403$14bf2060$c201a8c0@andy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

>The above looks fine -- the name is just "pgdata" instead of the more
conventional "data".
I had an old test database living in the data directory, and figured I
would use a clean directory.

>> I'm able to start postmaster from the command line as the postgres
>> user. The service just fails to start, giving error 1062. As you
>> noted below, this is not good. Is there a known cause for this error

>> and (hopefully) a solution?
>
>Do you see anything interesting in /var/log/postmaster.log? In the NT
>Event Log?
Yeah, there were a couple of interesting things in the event log. The
short version is that it looks like I made a typeo when I installed the
service, so uninstalling and reinstalling it worked.

I had previously been running 7.2.1 from my normal user account. When I
installed 7.3.2, it looks like permissions on the log file didn't get
set to allow the postgres user to have access to it. That's probably
just one of those things that people aren't supposed to do, but if
someone does do it, the postmaster log won't end up having anything in
it from the newer installation. Of course, the only time postgres has
problems is when people like me do things we're not supposed to, so it's
probably not a big deal :)

Thanks for the help.

Andy


From: Jason Tishler <jason(at)tishler(dot)net>
To: Andy Lowe <andyl(at)dmetrix(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: can't start postmaster as service
Date: 2003-03-06 18:02:07
Message-ID: 20030306180207.GL2008@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Andy,

On Thu, Mar 06, 2003 at 10:08:51AM -0700, Andy Lowe wrote:
> Thanks for the help.

You are welcome. I'm glad that 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