Thread: Postgresql on FreeBSD
Hi there. I came from linux and I'm not used to FreeBSD, so this might just be a bsd question at all. I installed the postgresql-7.0.2 port (make install), and then tried to run the daemon, but it wouldn't. Finally, I got this error message: Waiting for postmaster starting up..IpcMemoryCreate: shmget failed (Permission denied) key=5432010, size=144, permission=700 This type of error is usually caused by an improper shared memory or System V IPC semaphore configuration. For more information, see the FAQ and platform-specific FAQ's in the source directory pgsql/doc or on our web site at http://www.postgresql.org. IpcMemoryAttach: shmat failed (Permission denied) id=65536 FATAL 1: AttachSLockMemory: could not attach segment .. I checked the kernel, and it's compiled with SYSV IPC. Does anyone know what it is? Again, sorry if it's an out of topic question. Thanks in advance. -- Nelio Alves Pereira Filho IFX Networks Sao Paulo / Brazil
On Mon, 20 Nov 2000, Nelio Alves Pereira Filho wrote: > Hi there. > > I came from linux and I'm not used to FreeBSD, so this might just be a > bsd question at all. > > I installed the postgresql-7.0.2 port (make install), and then tried to > run the daemon, but it wouldn't. Finally, I got this error message: Hi. What version of FBSD? 2.x.x had no support in the kernel for SYSV type semaphores and shared memory... You can do a kernel rebuild and add this stuff...painless...details are in the pg docs or I can send you my log notes if this is indeed the problem. Cheers, Tom > Waiting for postmaster starting up..IpcMemoryCreate: shmget failed > (Permission denied) key=5432010, size=144, permission=700 > This type of error is usually caused by an improper > shared memory or System V IPC semaphore configuration. > For more information, see the FAQ and platform-specific > FAQ's in the source directory pgsql/doc or on our > web site at http://www.postgresql.org. > IpcMemoryAttach: shmat failed (Permission denied) id=65536 > FATAL 1: AttachSLockMemory: could not attach segment > .. > > I checked the kernel, and it's compiled with SYSV IPC. > Does anyone know what it is? Again, sorry if it's an out of topic > question. > > Thanks in advance. > > > > -- > Nelio Alves Pereira Filho > IFX Networks > Sao Paulo / Brazil > -------------------------------------------------------------------- SVCMC - Center for Behavioral Health -------------------------------------------------------------------- Thomas Good tomg@ { admin | q8 } .nrnet.org IS Coordinator / DBA Phone: 718-354-5528 Fax: 718-354-5056 -------------------------------------------------------------------- Powered by: PostgreSQL s l a c k w a r e FreeBSD: RDBMS |---------- linux The Power To Serve --------------------------------------------------------------------
* Nelio Alves Pereira Filho <nelio@ifx.com.br> [001120 07:09] wrote: > Hi there. > > I came from linux and I'm not used to FreeBSD, so this might just be a > bsd question at all. > > I installed the postgresql-7.0.2 port (make install), and then tried to > run the daemon, but it wouldn't. Finally, I got this error message: > > Waiting for postmaster starting up..IpcMemoryCreate: shmget failed > (Permission denied) key=5432010, size=144, permission=700 > This type of error is usually caused by an improper > shared memory or System V IPC semaphore configuration. > For more information, see the FAQ and platform-specific > FAQ's in the source directory pgsql/doc or on our > web site at http://www.postgresql.org. > IpcMemoryAttach: shmat failed (Permission denied) id=65536 > FATAL 1: AttachSLockMemory: could not attach segment > .. > > I checked the kernel, and it's compiled with SYSV IPC. > Does anyone know what it is? Again, sorry if it's an out of topic > question. *sigh* You didn't describe the machine you're working on at all, niether hardware (RAM available) nor OS version (of course). The solution is to increase the amount of shared memory available to processes. You'll want to bump up the sysctls: kern.ipc.shmmax: 4194304 kern.ipc.shmmin: 1 kern.ipc.shmseg: 64 kern.ipc.shmall: 1024 These are also documented in the most recent copies of the GENERIC kernel config file. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk."
It's a 4.1-STABLE FreeBSD. Do you have any other ideas? Thanks Thomas Good wrote: > > On Mon, 20 Nov 2000, Nelio Alves Pereira Filho wrote: > > > Hi there. > > > > I came from linux and I'm not used to FreeBSD, so this might just be a > > bsd question at all. > > > > I installed the postgresql-7.0.2 port (make install), and then tried to > > run the daemon, but it wouldn't. Finally, I got this error message: > > Hi. What version of FBSD? 2.x.x had no support in the kernel for > SYSV type semaphores and shared memory... > > You can do a kernel rebuild and add this stuff...painless...details > are in the pg docs or I can send you my log notes if this is indeed > the problem. > > Cheers, > Tom > > > Waiting for postmaster starting up..IpcMemoryCreate: shmget failed > > (Permission denied) key=5432010, size=144, permission=700 > > This type of error is usually caused by an improper > > shared memory or System V IPC semaphore configuration. > > For more information, see the FAQ and platform-specific > > FAQ's in the source directory pgsql/doc or on our > > web site at http://www.postgresql.org. > > IpcMemoryAttach: shmat failed (Permission denied) id=65536 > > FATAL 1: AttachSLockMemory: could not attach segment > > .. > > > > I checked the kernel, and it's compiled with SYSV IPC. > > Does anyone know what it is? Again, sorry if it's an out of topic > > question. > > > > Thanks in advance. > > > > > > > > -- > > Nelio Alves Pereira Filho > > IFX Networks > > Sao Paulo / Brazil > > > > -------------------------------------------------------------------- > SVCMC - Center for Behavioral Health > -------------------------------------------------------------------- > Thomas Good tomg@ { admin | q8 } .nrnet.org > IS Coordinator / DBA Phone: 718-354-5528 > Fax: 718-354-5056 > -------------------------------------------------------------------- > Powered by: PostgreSQL s l a c k w a r e FreeBSD: > RDBMS |---------- linux The Power To Serve > -------------------------------------------------------------------- -- Nelio Alves Pereira Filho IFX Networks Sao Paulo / Brazil
>> Waiting for postmaster starting up..IpcMemoryCreate: shmget failed >> (Permission denied) key=5432010, size=144, permission=700 "Permission denied" seems like an odd error for a request to create a shared-memory segment. The only likely thing I can think of is if there is already a shmem segment with that same key belonging to another user --- perhaps left over from a previous run of the postmaster under a different userID? Anyway, use "ipcs -a" to see what's hanging around your system. "ipcrm" (or our ipcclean script) can be used to get rid of unwanted segments. regards, tom lane