Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2002 21:31:04 -0700 (PDT)
From:      "Nielsen" <nielsen@memberwebs.com>
To:        "Joseph Maxwell" <jemaxwell@jaymax.com>, <questions@FreeBSD.ORG>
Subject:   Re: Problems w/ Semaphore - I'm in 'jail'
Message-ID:  <20020620043104.9796F37B414@hub.freebsd.org>
References:  <3D10B0FD.F0B7F4A5@jaymax.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Courier New" color=3D#000000 size=3D2>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):</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2>jail.sysvipc_allowed:=20
1</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 size=3D2>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.</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2>Nate</FONT></DIV>
<DIV><FONT face=3D"Courier New" color=3D#000000 =
size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Djemaxwell@jaymax.com =
href=3D"mailto:jemaxwell@jaymax.com">Joseph=20
  Maxwell</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dquestions@FreeBSD.ORG=20
  href=3D"mailto:questions@FreeBSD.ORG">questions@FreeBSD.ORG</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, June 19, 2002=20
10:25</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Problems w/ Semaphore =
- I'm in=20
  'jail'</DIV>
  <DIV><BR></DIV>Hello, <BR>Hope there are users in this group w/ =
PostgreSQL=20
  familiarity and this BSD interaction <BR>I am setting up postgreSQL =
and have=20
  ran into a problem related to either <BR>kernel config or operating =
within=20
  'the jail'.=20
  <P>Some interactions w/ the postgresql user groups =3D=3D&gt;=20
  <P>Systems:&nbsp; PostgreSQL version 7.2.1, with all default settings =
on a=20
  <BR>&nbsp; BSD platform&nbsp; ,4.5-RELEASE FreeBSD. <BR>&nbsp;=20
  <BLOCKQUOTE>&nbsp; hostname# initdb -D /usr/local/pgsql/data=20
    <BR>&nbsp;&nbsp; The files belonging to this database system will be =
owned=20
    by user "postgres". <BR>&nbsp;&nbsp; This user must also own the =
server=20
    process.=20
    <P>&nbsp;&nbsp; Fixing permissions on existing directory=20
    /usr/local/pgsql/data... ok <BR>&nbsp;&nbsp; creating directory=20
    /usr/local/pgsql/data/base... ok <BR>&nbsp;&nbsp; creating directory =

    /usr/local/pgsql/data/global... ok <BR>&nbsp;&nbsp; creating =
directory=20
    /usr/local/pgsql/data/pg_xlog... ok <BR>&nbsp;&nbsp; creating =
directory=20
    /usr/local/pgsql/data/pg_clog... ok <BR>&nbsp;&nbsp; creating =
template1=20
    database in /usr/local/pgsql/data/base/1... <BR>&nbsp;&nbsp;=20
    IpcSemaphoreCreate: semget(key=3D1, num=3D17, 03600) failed: =
Function not=20
    implemented=20
    <P>&nbsp;&nbsp; initdb failed. =
<BR>&nbsp;</P></BLOCKQUOTE>&nbsp;&nbsp; Any=20
  ideas on the semget() function, remembered reading on it somewhere =
before but=20
  <BR>&nbsp;&nbsp; can't remember where <BR>&nbsp;&nbsp; I hope this =
does not=20
  call for a kernel rebuild <BR>&nbsp;&nbsp; I did an ipcs -s which =
=3D=3D=3D&gt;=20
  <BR>&nbsp;=20
  <BLOCKQUOTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname# ipcs -s=20
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Semaphores:=20
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T&nbsp;&nbsp;&nbsp;&nbsp;=20
    ID&nbsp;&nbsp;&nbsp;&nbsp; =
KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp; =
GROUP=20
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname#=20
  <BR>&nbsp;</P></BLOCKQUOTE>&nbsp;&nbsp; Any insight on this type of =
problem?=20
  <P>Response =3D=3D=3D&gt; <BR>&nbsp; <B>Hmm, usually this means either =
the kernel's=20
  not configured for SYSV ipc</B> <BR><B>&nbsp; or that you're running =
in a jail=20
  and the sysctl to let the jail use</B> <BR><B>&nbsp; sysv ipc is not =
turned=20
  on.</B> <BR>&nbsp;=20
  <P>Is this a plausible explanation, &amp; if it is that&nbsp; the =
kernel's not=20
  configured for SYSV ipc <BR>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
  <P>&nbsp;Thanks=20
  <P>I've spoken w/ my ISP, Tech. support personnel not quite familiar =
w/=20
  problem but promised to investigate. <BR>Any other experienced =
opinions=20
  welcomed ...=20
  <P>---&nbsp;&nbsp; Joe&nbsp;&nbsp; --- <BR>&nbsp; <BR>&nbsp; =
<BR>&nbsp;=20
</P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_009E_01C217B2.C3AA2340--


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020620043104.9796F37B414>