Thread: IpcSemaphoreCreate - detailed account
I am still receiving an 'IpcSemaphoreCreate' error when I try to initialize the database as the 'postgres' user. I installed cygipc-1.13 successfully as a service and I can initialize the db fine under my own username and run postmaster as a non-service. But I'd like to get the service installation working. I am running on Windows XP. Here's a detailed log of my attempts to follow the provided installation instructions: ------------------------- The given command ipc-daemon --install-as-service did not work so i used instead cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path /usr/local/bin/ipc-daemon --termsig INT --shutdown i then started the ipc daemon net start ipc-daemon and i can verify from the services window that it is in fact running. I created the postgres user with net user postgres <password> /add /fullname:postgres /comment:'PostgreSQL user account' /homedir:"$(cygpath -w /home/postgres)" Where <password> was my chosen password and followed that with mkpasswd -l -u postgres >>/etc/passwd I granted the "postgres" user the "Log on as a service" user right: cmd /c secpol.msc This command opened the "Local Security Settings" Window. I clicked "Local Policies"->"User Rights Assignment"-->"Log on as a service". Clicked to add a user or group. Enter the name "postgres" and then the "Check Names" button. This replaced the 'postgres' name with '<ComputerName>/postgres'. I clicked OK and closed the "Local Security Settings" window. I installed postmaster as a service: cygrunsrv --install postmaster --desc "PostgreSQL Database Server" --path /usr/bin/postmaster --args "-D /usr/share/postgresql/data -i" --dep ipc-daemon --termsig INT --user postgres --shutdown --stdout /pgsql.log --stderr /pgsql.err I then clicked "Start"->"Log Off"->"Switch User"->"postgres". Opened up a cygwin shell and created the data directory mkdir /usr/share/postgresql/data and ensured the postgres user owned that directory chown postgres /usr/share/postgresql/data still logged on as 'postgres', i tried to initialize the database initdb -D /usr/share/postgresql/data and i received the following error: The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. Fixing permissions on existing directory /usr/share/postgresql/data... ok creating directory /usr/share/postgresql/data/base... ok creating directory /usr/share/postgresql/data/global... ok creating directory /usr/share/postgresql/data/pg_xlog... ok creating directory /usr/share/postgresql/data/pg_clog... ok creating template1 database in /usr/share/postgresql/data/base/1... IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemented initdb failed. ------------------------- Any help? Thanks, Greg
Greg, On Sat, Feb 08, 2003 at 08:01:03AM -0500, Gregory D Dennis wrote: > I am running on Windows XP. Home or Pro. > The given command > > ipc-daemon --install-as-service > > did not work so i used instead The above is bad. Please report this to the Cygwin list. > cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path > /usr/local/bin/ipc-daemon --termsig INT --shutdown > > i then started the ipc daemon > > net start ipc-daemon > > and i can verify from the services window that it is in fact running. > I created the postgres user with Does ipctest work? Especially, from the postgres account? If not, then PostgreSQL will not work too. > still logged on as 'postgres', i tried to initialize the database > > initdb -D /usr/share/postgresql/data > > and i received the following error: > > [snip] > > IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not > implemented > > initdb failed. What is the output of the following command: $ ls -ld /tmp /tmp/cygipc_? /tmp/MultiFile* drwxrwxrwx+ 101 Administ None 188416 Feb 10 08:56 /tmp -rw-rw-rw- 1 SYSTEM SYSTEM 3916520 Jan 17 11:19 /tmp/MultiFileMsg -rw-rw-rw- 1 SYSTEM SYSTEM 22032 Jan 17 11:19 /tmp/MultiFileSem -rw-rw-rw- 1 SYSTEM SYSTEM 202768 Jan 17 11:19 /tmp/MultiFileShm -rw------- 1 postgres None 1441792 Jan 13 16:30 /tmp/cygipc_0 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
I am running Windows XP Pro. With your expert help, I've been able to narrow down the problem. Here's what I did: $ ipc-daemon --install-as-service $ net start ipc-daemon The second command produced an error: The service is not responding to the control function. More help is available by typing NET HELPMSG 2186. Trying to start it from the services window produced: Could not start the Cygwin IPC Daemon service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion. I found archived messages to this list with similar problems using install-as-service on Windows XP. They suggest, and I used, the following: $ cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path /usr/local/bin/ipc-daemon --termsig INT --shutdown $ net start ipc-daemon This produced no error, so I tested it: $ ipctest s Test v0.03 semaphore 0 created I took this to be successful. I then switched to the 'postgres' user and tried it as well. But this time I received an error: $ ipctest s Test v0.03 Unable to create semaphore semget : Function not implemented The 'postgres' user is an Administrator. I know postgresql won't work unless ipctest runs successfully under the postgres user, so this is where I stopped. Any ideas why this is happening? Thanks, Greg Jason Tishler wrote: > Greg, > > On Sat, Feb 08, 2003 at 08:01:03AM -0500, Gregory D Dennis wrote: > >>I am running on Windows XP. > > > Home or Pro. > > >>The given command >> >> ipc-daemon --install-as-service >> >>did not work so i used instead > > > The above is bad. Please report this to the Cygwin list. > > >> cygrunsrv --install ipc-daemon --desc "CygWin IPC Daemon" --path >>/usr/local/bin/ipc-daemon --termsig INT --shutdown >> >>i then started the ipc daemon >> >> net start ipc-daemon >> >>and i can verify from the services window that it is in fact running. >>I created the postgres user with > > > Does ipctest work? Especially, from the postgres account? If not, then > PostgreSQL will not work too. > > >>still logged on as 'postgres', i tried to initialize the database >> >> initdb -D /usr/share/postgresql/data >> >>and i received the following error: >> >>[snip] >> >>IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not >>implemented >> >> initdb failed. > > > What is the output of the following command: > > $ ls -ld /tmp /tmp/cygipc_? /tmp/MultiFile* > drwxrwxrwx+ 101 Administ None 188416 Feb 10 08:56 /tmp > -rw-rw-rw- 1 SYSTEM SYSTEM 3916520 Jan 17 11:19 /tmp/MultiFileMsg > -rw-rw-rw- 1 SYSTEM SYSTEM 22032 Jan 17 11:19 /tmp/MultiFileSem > -rw-rw-rw- 1 SYSTEM SYSTEM 202768 Jan 17 11:19 /tmp/MultiFileShm > -rw------- 1 postgres None 1441792 Jan 13 16:30 /tmp/cygipc_0 > > Jason >
Greg, On Thu, Feb 13, 2003 at 02:12:28AM -0500, Gregory D Dennis wrote: > I am running Windows XP Pro. > > With your expert help, I've been able to narrow down the problem. Here's > what I did: > > $ ipc-daemon --install-as-service > $ net start ipc-daemon > > The second command produced an error: > > The service is not responding to the control function. > More help is available by typing NET HELPMSG 2186. > > Trying to start it from the services window produced: > > Could not start the Cygwin IPC Daemon service on Local Computer. > Error 1053: The service did not respond to the start or control > request in a timely fashion. Please report the above to the Cygwin list. > I took this to be successful. I then switched to the 'postgres' user and > tried it as well. But this time I received an error: > > $ ipctest s > Test v0.03 > Unable to create semaphore > semget : Function not implemented You did not answer the following from my previous post: Jason Tishler wrote: > What is the output of the following command: > > $ ls -ld /tmp /tmp/cygipc_? /tmp/MultiFile* > drwxrwxrwx+ 101 Administ None 188416 Feb 10 08:56 /tmp > -rw-rw-rw- 1 SYSTEM SYSTEM 3916520 Jan 17 11:19 /tmp/MultiFileMsg > -rw-rw-rw- 1 SYSTEM SYSTEM 22032 Jan 17 11:19 /tmp/MultiFileSem > -rw-rw-rw- 1 SYSTEM SYSTEM 202768 Jan 17 11:19 /tmp/MultiFileShm > -rw------- 1 postgres None 1441792 Jan 13 16:30 /tmp/cygipc_0 I will try again. Does the following apply to your situation? http://archives.postgresql.org/pgsql-cygwin/2003-01/msg00143.php http://archives.postgresql.org/pgsql-cygwin/2003-01/msg00178.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