Thread: starting postmaster W2K service

starting postmaster W2K service

From
"Michel (Free)"
Date:
I've downloaded latest cygwin-1.5.5-1.tar.bz2 with postgresql-7.3.4-2.tar.bz2.
Service ipc-daemon2 is running fine (from cygipc-2.01-2.tar.bz2).
 
Everything was fine until step 9 when starting postmaster : cygrunsrv -S postmaster
 
I got following error (on W2K)
 
$ cygrunsrv -S postmaster
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
Le service n'a pas été démarré.
 
I cannot find any detailed error message.
Thanks for help
 
Michel

Re: starting postmaster W2K service

From
Jason Tishler
Date:
Michel,

On Sat, Oct 18, 2003 at 01:02:32AM +0200, Michel (Free) wrote:
> I got following error (on W2K)
>
> $ cygrunsrv -S postmaster
> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
> Le service n'a pas été démarré.
>
> I cannot find any detailed error message.
> Thanks for help

Does the following help?

    http://archives.postgresql.org/pgsql-cygwin/2003-03/msg00021.php

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: starting postmaster W2K service

From
"Michel (Free)"
Date:
Hi Jason,
That helped definitly.

In the window event log, I find :
Beginning is in french but important message (at the end) is in english.

    Impossible de trouver la description de l'ID d'événement ( 0 ) dans la
source ( postmaster ). L'ordinateur local n'a peut-être pas les informations
de Registre nécessaires ou les fichiers DLL de messagerie pour     afficher
les messages provenant d'un ordinateur distant postmaster : PID 1472 :
starting service `' failed: redirect_fd: open (1, /var/log/postmaster.log):
13, Permission denied.

I found that I had an existing postmaster.log that belong to someone else so
I could'nt overwrite it .
I deleted it and now service starts

Probable my first service problem was about LOCALE (which I changed from
'french' to 'C' before using initDB)
Then I made some test to find out why my service startup was wrong, by
changing user for Windows service (from postgres to mch user)
Then I still got an error about service, but I think cause had changed. It
was not a LOCALE error anymore but a write permission about postmaster.log

Thanks for your quick response..
As it is my first time using mailing list, should I answer all (including
your personal email + mailing group) like this mail or should I only write
to mailing group ?

Michel

----- Original Message -----
From: "Jason Tishler" <jason@tishler.net>
To: "Michel (Free)" <mcharp@free.fr>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Monday, October 20, 2003 1:57 PM
Subject: Re: [CYGWIN] starting postmaster W2K service


> Michel,
>
> On Sat, Oct 18, 2003 at 01:02:32AM +0200, Michel (Free) wrote:
> > I got following error (on W2K)
> >
> > $ cygrunsrv -S postmaster
> > cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
1062:
> > Le service n'a pas été démarré.
> >
> > I cannot find any detailed error message.
> > Thanks for help
>
> Does the following help?
>
>     http://archives.postgresql.org/pgsql-cygwin/2003-03/msg00021.php
>
> 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: starting postmaster W2K service

From
Jason Tishler
Date:
Michel,

On Mon, Oct 20, 2003 at 02:26:59PM +0200, Michel (Free) wrote:
> That helped definitly.

Good.

> [snip]
>
> Thanks for your quick response..

You are very welcome.

> As it is my first time using mailing list, should I answer all
> (including your personal email + mailing group) like this mail or
> should I only write to mailing group ?

I can only speak for myself, others may feel differently.  As long as a
poster CC's the appropriate list, then I'm happy and will not consider
the message private email.

BTW, I use procmail for duplicate message suppression and keyword
recognition.  Hence, dups don't bother (or affect) me and the
"important" mailing list messages are copied to my inbox anyway...

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: starting postmaster W2K service

From
Jason Tishler
Date:
Akhona,

On Tue, Oct 21, 2003 at 11:35:08AM +0200, Akhona Damane wrote:
> Thank you, I also could not start PostgreSQL server, but after
> removiing postmaster.pid from the data directory - it worked.
>
> Thank you again

You are welcome.

However, this is a different problem, so you solved it yourself.  Maybe
you should be thanking yourself instead? :,)

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: starting postmaster W2K service

From
"Akhona Damane"
Date:
Thank you, I also could not start PostgreSQL server, but after removiing postmaster.pid from the data directory - it
worked.

Thank you again



Mr. Akhona Damane
CSIR Environmentek
Spatial Technology
(012) 841 3188
Fax (012) 8412689
adamane@csir.co.za

>>> "Michel (Free)" <mcharp@free.fr> 10/20/03 02:26PM >>>
Hi Jason,
That helped definitly.

In the window event log, I find :
Beginning is in french but important message (at the end) is in english.

    Impossible de trouver la description de l'ID d'événement ( 0 ) dans la
source ( postmaster ). L'ordinateur local n'a peut-être pas les informations
de Registre nécessaires ou les fichiers DLL de messagerie pour     afficher
les messages provenant d'un ordinateur distant postmaster : PID 1472 :
starting service `' failed: redirect_fd: open (1, /var/log/postmaster.log):
13, Permission denied.

I found that I had an existing postmaster.log that belong to someone else so
I could'nt overwrite it .
I deleted it and now service starts

Probable my first service problem was about LOCALE (which I changed from
'french' to 'C' before using initDB)
Then I made some test to find out why my service startup was wrong, by
changing user for Windows service (from postgres to mch user)
Then I still got an error about service, but I think cause had changed. It
was not a LOCALE error anymore but a write permission about postmaster.log

Thanks for your quick response..
As it is my first time using mailing list, should I answer all (including
your personal email + mailing group) like this mail or should I only write
to mailing group ?

Michel

----- Original Message -----
From: "Jason Tishler" <jason@tishler.net>
To: "Michel (Free)" <mcharp@free.fr>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Monday, October 20, 2003 1:57 PM
Subject: Re: [CYGWIN] starting postmaster W2K service


> Michel,
>
> On Sat, Oct 18, 2003 at 01:02:32AM +0200, Michel (Free) wrote:
> > I got following error (on W2K)
> >
> > $ cygrunsrv -S postmaster
> > cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
1062:
> > Le service n'a pas été démarré.
> >
> > I cannot find any detailed error message.
> > Thanks for help
>
> Does the following help?
>
>     http://archives.postgresql.org/pgsql-cygwin/2003-03/msg00021.php
>
> 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/docs/faqs/FAQ.html


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.


Re: starting postmaster W2K service

From
Jason Tishler
Date:
Akhona,

Please keep your replies on-list.

On Thu, Oct 23, 2003 at 04:14:09PM +0200, Akhona Damane wrote:
> Now the problem is this the PostgreSQL Server is not starting from the
> Computer Management Services with an error message saying "The service
> could not start due to a logon failure".

Does the following from the README apply?

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

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

Was the password entered correctly?

> But the server does start when I open the Postgres program (Start ->
> Programs -> PostgreSQL -> Utilities -> Start PostgreSQL Server), and I
> can create Databases. But when I try to connect remotely to the
> Database using PgAdmin it gives an error message saying "Error
> connecting to the server. Is the server running on host ....".
>
> what does this mean? What do you suggest I must do?

Sorry, but I have never used PgAdmin before.

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: starting postmaster W2K service

From
Frank Seesink
Date:
...
>>But the server does start when I open the Postgres program (Start ->
>>Programs -> PostgreSQL -> Utilities -> Start PostgreSQL Server), and I
>>can create Databases. But when I try to connect remotely to the
>>Database using PgAdmin it gives an error message saying "Error
>>connecting to the server. Is the server running on host ....".
>>
>>what does this mean? What do you suggest I must do?
>
> Sorry, but I have never used PgAdmin before.
>
> Jason

Akhona,

In short, the error message you are seeing is very much like what you
would get if you tried using 'psql' from the Cygwin command line, such as

____________________________________________________________

[Connecting from psql to PostgreSQL via internal sockets]
$ psql template1
psql: could not connect to server: No such file or directory
         Is the server running locally and accepting
         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

[Connecting from psql to PostgreSQL via TCP/IP ports]
$ psql -h localhost template1
psql: could not connect to server: Connection refused
         Is the server running on host localhost and accepting
         TCP/IP connections on port 5432?
____________________________________________________________

The error message indicates that pgAdmin does not "see" your PostgreSQL
server sitting on TCP port 5432 (assuming defaults).  As noted with
psql's error messages above, the question asked is pretty
straightforward.  In short, "I can't see PostgreSQL.  Are you sure it's
running?"

As pgAdmin connects via TCP/IP and NOT via internal sockets, it's
important that you have your PostgreSQL configured to listen via TCP/IP
(which, by default, it is not).  Specificically, look at

    /usr/share/postgresql/data/pg_hba.conf
    /usr/share/postgresql/data/postgresql.conf

(again, assuming you have followed the README and used default
directories).  These files are self-explanatory with excellent comments.
  Just read them and make the appropriate adjustments to make sure
PostgreSQL is listening via TCP/IP.  Then pgAdmin should work fine.

NOTE:  For basic TCP/IP connectivity, only one line needs to be changed
in each file.  But I think it's in your best interest to understand what
those files are doing for you.  Be aware that having PostgreSQL
listening via TCP/IP (one line in postgresql.conf) "opens up" your
database to possible attack from the Net, so it's important to
understand how to allow ONLY those users and/or IP addresses that should
have access (set in pg_hba.conf).  My test setup is set to only allow
access from the localhost/loopback address, 127.0.0.1.  Your situation
may require something different.

By the way, what version of pgAdmin are you using?  The latest version
as I write this is pgAdmin III v1.0.0, which I have installed and
running.  If you are running either an older beta of pgAdmin III or some
version of pgAdmin II, be sure to look into this release.  Details here:

    http://pgadmin.postgresql.org/pgadmin3/


P.S.    Jason, when it comes to pgAdmin, I suspect you already know it's
    a free, open-source GUI front-end/client for PostgreSQL.  Just
    note that it requires a TCP/IP hook into PostgreSQL.  It does
    not support connection via sockets.  So odds are the most common
    problem will be users not configuring PostgreSQL for TCP/IP.


Re: starting postmaster W2K service

From
Jason Tishler
Date:
Vanessa,

Please post instead of sending private email.

On Mon, Oct 27, 2003 at 10:37:45PM +0000, Vanessa Brooks wrote:
> Please take me off this mailling list

I do not have the authority to do the above, but you do yourself:

    http://webmail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&func=lists-long-full&extra=pgsql-cygwin

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