Thread: initdb/ipc-daemon error

initdb/ipc-daemon error

From
"Kevin Schroeder"
Date:
Hello,
    I'm trying to get PostgreSQL running as a service on Windows and I'm having some issues getting the PostgreSQL system initialized.  I've got the IPC daemon running, ipctest seems to work (it's not reporting any errors) and I'm running it from the PostgreSQL user... in my case SRV_PostgreSQL.
 
    When I try to run initdb -D /usr/local/pgsql/data I get an error stating "IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemented".  In checking the mailing lists the most common problem was the files in the /tmp directory or an outdated ipc-daemon program.  /tmp has been cleared (and the ipc-daemon program restarted from the Service Control window) and I'm using cygipc v 2.01.2 which I just updated today.
 
    Does anyone know what might be causing this?
 
Thanks
Kevin Schroeder

Re: initdb/ipc-daemon error

From
Reshat Sabiq
Date:


Kevin Schroeder wrote:
Hello,
    I'm trying to get PostgreSQL running as a service on Windows and I'm having some issues getting the PostgreSQL system initialized.  I've got the IPC daemon running, ipctest seems to work (it's not reporting any errors) and I'm running it from the PostgreSQL user... in my case SRV_PostgreSQL.
 
    When I try to run initdb -D /usr/local/pgsql/data I get an error stating "IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemented".  In checking the mailing lists the most common problem was the files in the /tmp directory or an outdated ipc-daemon program.  /tmp has been cleared (and the ipc-daemon program restarted from the Service Control window) and I'm using cygipc v 2.01.2 which I just updated today.
 
    Does anyone know what might be causing this?
 
Thanks
Kevin Schroeder
I had this problem too, but ended up just using the command line and starting up manually. If you find a solution, i would be interested in it.
Thanks.
-- 
Sincerely,
Reshat.

-------------------------------------------------------------------------------------------
If you see my certificate with this message, you should be able to send me encrypted e-mail. 
Please consult your e-mail client for details if you would like to do that.
Attachment

Re: initdb/ipc-daemon error

From
"Kevin Schroeder"
Date:
    Well, the problem seems to be worked out.  The problem was that I was using the ipc-daemon program rather than the ipc-daemon2 program.  I decided to wipe my CygWin installation and start from scratch and realized that even though I installed cygipc the ipc-daemon wouldn't run.  So I looked at the directory where it should be and there was ipc-daemon2.exe.  I couldn't get it to run as a service, but if I double clicked it from explorer it would keep on running in the background.  Then I used the cygrunsrv program to set PostgreSQL to run as a service, removing the --dep ipc-daemon argument since it was running from explorer.  I tried starting up PostgreSQL and much to my surprise it started.
 
    Does anyone know when the native Windows PostgreSQL 7.4 will be out?  It would definitely be a benefit for people who want to use PostgreSQL on Windows.  I, myself, don't, but in order to satisfy project requirements you've gotta do what you've gotta do.
 
Kevin
----- Original Message -----
Sent: Monday, September 15, 2003 9:42 PM
Subject: Re: [CYGWIN] initdb/ipc-daemon error



Kevin Schroeder wrote:
Hello,
    I'm trying to get PostgreSQL running as a service on Windows and I'm having some issues getting the PostgreSQL system initialized.  I've got the IPC daemon running, ipctest seems to work (it's not reporting any errors) and I'm running it from the PostgreSQL user... in my case SRV_PostgreSQL.
 
    When I try to run initdb -D /usr/local/pgsql/data I get an error stating "IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemented".  In checking the mailing lists the most common problem was the files in the /tmp directory or an outdated ipc-daemon program.  /tmp has been cleared (and the ipc-daemon program restarted from the Service Control window) and I'm using cygipc v 2.01.2 which I just updated today.
 
    Does anyone know what might be causing this?
 
Thanks
Kevin Schroeder
I had this problem too, but ended up just using the command line and starting up manually. If you find a solution, i would be interested in it.
Thanks.
-- 
Sincerely,
Reshat.

-------------------------------------------------------------------------------------------
If you see my certificate with this message, you should be able to send me encrypted e-mail. 
Please consult your e-mail client for details if you would like to do that.

Re: initdb/ipc-daemon error

From
Claudio Natoli
Date:
Hi there,

>  I tried starting up PostgreSQL and much to my surprise it started.

Good to see you sorted this out!


>    Does anyone know when the native Windows PostgreSQL 7.4 will be out?
It would definitely be a benefit for people who want to use PostgreSQL on
Windows.  I, myself, don't, but in order to satisfy project requirements
you've gotta do what you've gotta do.

Postgres 7.4 will *not* be available for native Windows. It is being worked
on, and hopefully we'll see it for 7.5... maybe.

Cheers,
Claudio

---
WE HAVE MOVED - PLEASE NOTE OUR NEW CONTACT DETAILS:
THE BASEMENT, 33 EWELL STREET, BALMAIN NSW 2041
TEL: +61 2 9555 1544 FAX: +61 2 9555 6911
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
http://www.memetrics.com/emailpolicy.html

Re: initdb/ipc-daemon error

From
Frank Seesink
Date:
Kevin Schroeder wrote:
>     Well, the problem seems to be worked out.  The problem was that I
> was using the ipc-daemon program rather than the ipc-daemon2 program.  I
> decided to wipe my CygWin installation and start from scratch and
> realized that even though I installed cygipc the ipc-daemon wouldn't
> run.  So I looked at the directory where it should be and there was
> ipc-daemon2.exe.  I couldn't get it to run as a service, but if I double
> clicked it from explorer it would keep on running in the background.
> Then I used the cygrunsrv program to set PostgreSQL to run as a service,
> removing the --dep ipc-daemon argument since it was running from
> explorer.  I tried starting up PostgreSQL and much to my surprise it
> started.
...

Kevin,

For future reference, always check out Jason's README at

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

as you might have caught the issue earlier since he lists you need
ipc-daemon2, not ipc-daemon.  This change occurred with PostgreSQL
v7.3.4-2 if I remember right, as ipc-daemon2 is now part of cygwin
proper, not an external component.  As such, they have made the names
different so users updating their Cygwin installs with setup.exe don't
hose their current setups of older versions of PostgreSQL (since
pre-7.3.4-2 required ipc-daemon, whereas 7.3.4-2 and greater will be
using ipc-daemon2).

Should anyone else find themselves running an older variant of
PostgreSQL and upgrading in a similar manner to 7.3.4-2 or above, the
easiest solution is simply to 'uninstall' the ipc-daemon and postmaster
services, then 'install' ipc-daemon2 and 're-install' postmaster with
its dependency set to the new ipc-daemon2.  Note I put these 'install'
words in comments because the files should already be in the Cygwin
tree.  What you are doing in essence is simply modifying the Windows
Registry so that ipc-daemon2 and postmaster are treated like NT
services, so you can start/stop/restart them like any other service.

Basically, assuming you followed Jason's README initially,

$ net stop postmaster
$ net stop ipc-daemon
$ ipc-daemon --remove-as-service
$ cygrunsrv --remove postmaster
$ ipc-daemon2 --install-as-service
$ cygrunsrv --install postmaster --path /usr/bin/postmaster --args "-D
/usr/share/postgresql/data -i" --dep ipc-daemon2 --termsig INT --user
postgres --shutdown

Then remove any leftover ipc files:
$ rm /tmp/MultiFile*
$ rm /tmp/cyg*

And finally fire the services back up again:
$ net start ipc-daemon2
$ net start postmaster

This sure beats having to do a clean Cygwin install.  Hope this helps
(even though for you, Kevin, it's too late :-) ).