dbTalk Databases Forums  

Problem starting ipc-daemon2

comp.databases.postgresql.ports comp.databases.postgresql.ports


Discuss Problem starting ipc-daemon2 in the comp.databases.postgresql.ports forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wolfgang
 
Posts: n/a

Default Problem starting ipc-daemon2 - 06-23-2004 , 01:02 PM






I'm Using Windows XP and latest Cygwin / Postgres.

I used to be able to get Postgres going easily under Cygwin
with a few simple steps (see appended). That is until recently, when
I reinstalled Cygwin for other reasons. Now, with ipc-daemon2 not
starting, I can't get Postgres to work

So, when I attempt to start the ipc daemon

$ ipc-daemon2 &

it will just hang, sit there forever.

There is an entry in the XP services panel called
"Cygwin IPC Daemon 2"
pointing to "C:\cygwin\bin\ipc-daemon2.exe" "--service"
(I think that got in there when I ran
ipc-daemon2.exe --install-as-service
some time ago)

When when I attempt to start "Cygwin IPC Daemon 2" from XP
I get the message "Cygwin IPC Daemon 2 service started and then
stopped. Some services stop automatically if they have no work to do,
for example Performance logs and Alerts Service".

When

Any ideas about what's going on?

Thanks for your help and advice.

Wolfgang

============================
This is how it used to work (BUT ipd-daemon2 FAILS TO START NOW)
1. Start the cygipc ipc-daemon2: $ ipc-daemon2 &
2. Initialize PostgreSQL: $ initdb -D
/usr/share/postgresql/data
3. Start the PostgreSQL postmaster: $ postmaster -D
/usr/share/postgresql/data &
4. Connect to PostgreSQL: $ psql template1
============================

Reply With Quote
  #2  
Old   
Wolfgang
 
Posts: n/a

Default Re: Problem starting ipc-daemon2 - 06-23-2004 , 06:05 PM






Well, it took me the better part of two days, but I figured it out,
and here is what I learned:

History:
********
We used to install/run Postgres < (less than) version 7.4.2 under
Cygwin as follows:
(NOTE: THIS NO LONGER WORKS, it is history)
1. Start the cygipc ipc-daemon2: $ ipc-daemon2 &
2. Initialize PostgreSQL: $ initdb
-D/usr/share/postgresql/data
3. Start the PostgreSQL postmaster: $ postmaster -D
/usr/share/postgresql/data &
4. Connect to PostgreSQL: $ psql template1


We now do the following for
PostScript version >= (greater/equal) version 7.4.2-1
************************************************** ***
- Read Jason Tishlers message "Updated Cygwin Package:
postgresql-7.4.2-1"
at
http://cygwin.com/ml/cygwin/2004-06/msg00457.html

- This basically tells us to upgrade to PostgreSQL 7.4.2, and with
this to run Postgres against cygserver instead of cygipc

- Read
How to use the Cygserver services
and
How to use the Cygserver services
in
http://www.cygwin.com/cygwin-ug-net/...cygserver.html

- This basically tells you that you need to initialize cygserver by
running
/usr/bin/cygserver-config
(I believe this installs "Cygwin cygserver" as a Microsoft XP service
and sets it for automatic startup on reboot; (when started, two
processes cygrunsrv.exe and cygserver.exe will appear in the XP Task
Manager)

- You need to set the environment variable
CYGWIN=server
BEFORE initializing Postgres with
initdb -D /usr/share/postgresql/data

Environment variables:
**********************
As far as I can tell from
http://www.cygwin.com/cygwin-ug-net/setup-env.html
environment variables in Cygwin are set in an XP (DOS) shell, or via
the XP Start Button->Settings->Control

Panel->System->Advanced->Environment Variables (probably as a System
Variable rather than a User variable, which former would

be good for all users).
In other words, you set the environment variable CYGWIN before
starting cygwin

Glitches / Errors
*****************
For some anoying reason often when starting up Postmaster (the
Postgres server) with
$ /usr/bin/pg_ctl -D /usr/share/postgresql/data -l postgreslog start
I get an error
pg_ctl: Another postmaster may be running. Trying to start postmaster
anyway.
980: Signal 12
pg_ctl: cannot start postmaster
Examine the log output.

I fix this by removing the lock file
$ rm /usr/share/postgresql/data/postmaster.pid

- If you had previously installed ipc-daemon2 (or ipc-daemon) as an XP
service, it may still be in the services list. Check

under
XP (DOS) shell, or via the XP Start Button->Settings->Control
Panel->Services under something like
"Cygwin IPC Daemon 2"
You can remove it under Cygwin with
$ ipc-daemon2 --remove-as-service

(Also chkeck the XP Task Manager that ipc it isn't still running, and
if so, stop it.)

Thanks,
Wolfgang.
Santa Barbara


Keywords:
Postgres Cygwin, error signal 12, cygserver, cygrunsrv, ipc-daemon,
ipc-daemon2, psql hangs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.