From owner-freebsd-questions Wed Jun 19 21:31:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.npubs.com (npubs.com [207.111.208.224]) by hub.freebsd.org (Postfix) with ESMTP id 9796F37B414 for ; Wed, 19 Jun 2002 21:31:04 -0700 (PDT) Received: 8.12.2-(Neptune) From: "Nielsen" To: "Joseph Maxwell" , References: <3D10B0FD.F0B7F4A5@jaymax.com> Subject: Re: Problems w/ Semaphore - I'm in 'jail' MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009E_01C217B2.C3AA2340" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-Id: <20020620043104.9796F37B414@hub.freebsd.org> Date: Wed, 19 Jun 2002 21:31:04 -0700 (PDT) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_009E_01C217B2.C3AA2340 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Yes this is a common problem with both PostgreSQL and MySQL. In my = experience you have to turn on the kernel variable (in the host system): jail.sysvipc_allowed: 1 Note that this is a potential security breach as it allows programs = operating within a jail to influence or communicate with other programs = (that use sysvipc) running either in the root system or in another jail. = Bit of a bummer. Nate ----- Original Message -----=20 From: Joseph Maxwell=20 To: questions@FreeBSD.ORG=20 Sent: Wednesday, June 19, 2002 10:25 Subject: Problems w/ Semaphore - I'm in 'jail' Hello,=20 Hope there are users in this group w/ PostgreSQL familiarity and this = BSD interaction=20 I am setting up postgreSQL and have ran into a problem related to = either=20 kernel config or operating within 'the jail'.=20 Some interactions w/ the postgresql user groups =3D=3D>=20 Systems: PostgreSQL version 7.2.1, with all default settings on a=20 BSD platform ,4.5-RELEASE FreeBSD.=20 =20 hostname# initdb -D /usr/local/pgsql/data=20 The files belonging to this database system will be owned by user = "postgres".=20 This user must also own the server process.=20 Fixing permissions on existing directory /usr/local/pgsql/data... = ok=20 creating directory /usr/local/pgsql/data/base... ok=20 creating directory /usr/local/pgsql/data/global... ok=20 creating directory /usr/local/pgsql/data/pg_xlog... ok=20 creating directory /usr/local/pgsql/data/pg_clog... ok=20 creating template1 database in /usr/local/pgsql/data/base/1...=20 IpcSemaphoreCreate: semget(key=3D1, num=3D17, 03600) failed: = Function not implemented=20 initdb failed.=20 =20 Any ideas on the semget() function, remembered reading on it = somewhere before but=20 can't remember where=20 I hope this does not call for a kernel rebuild=20 I did an ipcs -s which =3D=3D=3D>=20 =20 hostname# ipcs -s=20 Semaphores:=20 T ID KEY MODE OWNER GROUP=20 hostname#=20 =20 Any insight on this type of problem?=20 Response =3D=3D=3D>=20 Hmm, usually this means either the kernel's not configured for SYSV = ipc=20 or that you're running in a jail and the sysctl to let the jail use=20 sysv ipc is not turned on.=20 =20 Is this a plausible explanation, & if it is that the kernel's not = configured for SYSV ipc=20 or that I am running in a jail how can the sysctl be turned on to = allow the jail to use sysv ipc?=20 Thanks=20 I've spoken w/ my ISP, Tech. support personnel not quite familiar w/ = problem but promised to investigate.=20 Any other experienced opinions welcomed ...=20 --- Joe ---=20 =20 =20 =20 ------=_NextPart_000_009E_01C217B2.C3AA2340 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Yes this is a = common problem=20 with both PostgreSQL and MySQL. In my experience you have to turn on the = kernel=20 variable (in the host system):
 
jail.sysvipc_allowed:=20 1
 
Note that this = is a potential=20 security breach as it allows programs operating within a jail to = influence or=20 communicate with other programs (that use sysvipc) running either in the = root=20 system or in another jail. Bit of a bummer.
 
Nate
 
----- Original Message -----
From:=20 Joseph=20 Maxwell
Sent: Wednesday, June 19, 2002=20 10:25
Subject: Problems w/ Semaphore = - I'm in=20 'jail'

Hello,
Hope there are users in this group w/ = PostgreSQL=20 familiarity and this BSD interaction
I am setting up postgreSQL = and have=20 ran into a problem related to either
kernel config or operating = within=20 'the jail'.=20

Some interactions w/ the postgresql user groups =3D=3D>=20

Systems:  PostgreSQL version 7.2.1, with all default settings = on a=20
  BSD platform  ,4.5-RELEASE FreeBSD.
 =20

  hostname# initdb -D /usr/local/pgsql/data=20
   The files belonging to this database system will be = owned=20 by user "postgres".
   This user must also own the = server=20 process.=20

   Fixing permissions on existing directory=20 /usr/local/pgsql/data... ok
   creating directory=20 /usr/local/pgsql/data/base... ok
   creating directory = /usr/local/pgsql/data/global... ok
   creating = directory=20 /usr/local/pgsql/data/pg_xlog... ok
   creating = directory=20 /usr/local/pgsql/data/pg_clog... ok
   creating = template1=20 database in /usr/local/pgsql/data/base/1...
  =20 IpcSemaphoreCreate: semget(key=3D1, num=3D17, 03600) failed: = Function not=20 implemented=20

   initdb failed. =
 

   Any=20 ideas on the semget() function, remembered reading on it somewhere = before but=20
   can't remember where
   I hope this = does not=20 call for a kernel rebuild
   I did an ipcs -s which = =3D=3D=3D>=20
 =20
       hostname# ipcs -s=20
       Semaphores:=20
       T    =20 ID     = KEY       =20 MODE       OWNER    = GROUP=20

      hostname#=20
 

   Any insight on this type of = problem?=20

Response =3D=3D=3D>
  Hmm, usually this means either = the kernel's=20 not configured for SYSV ipc
  or that you're running = in a jail=20 and the sysctl to let the jail use
  sysv ipc is not = turned=20 on.
 =20

Is this a plausible explanation, & if it is that  the = kernel's not=20 configured for SYSV ipc
or that I am running in a jail how can the = sysctl=20 be turned on to allow the jail to use sysv ipc?=20

 Thanks=20

I've spoken w/ my ISP, Tech. support personnel not quite familiar = w/=20 problem but promised to investigate.
Any other experienced = opinions=20 welcomed ...=20

---   Joe   ---
 
  =
 =20

------=_NextPart_000_009E_01C217B2.C3AA2340-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message