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

[-- Attachment #1 --]
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 ----- 
  From: Joseph Maxwell 
  To: questions@FreeBSD.ORG 
  Sent: Wednesday, June 19, 2002 10:25
  Subject: Problems w/ Semaphore - I'm in 'jail'


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

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

      hostname# initdb -D /usr/local/pgsql/data 
       The files belonging to this database system will be owned by user "postgres". 
       This user must also own the server process. 
       Fixing permissions on existing directory /usr/local/pgsql/data... ok 
       creating directory /usr/local/pgsql/data/base... ok 
       creating directory /usr/local/pgsql/data/global... ok 
       creating directory /usr/local/pgsql/data/pg_xlog... ok 
       creating directory /usr/local/pgsql/data/pg_clog... ok 
       creating template1 database in /usr/local/pgsql/data/base/1... 
       IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not implemented 

       initdb failed. 
     

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

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

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

   Thanks 

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

  ---   Joe   --- 
    
    
    


[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2713.1100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" color=#000000 size=2>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):</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000000 size=2>jail.sysvipc_allowed: 
1</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000000 size=2>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.</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000000 size=2>Nate</FONT></DIV>
<DIV><FONT face="Courier New" color=#000000 size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=jemaxwell@jaymax.com href="mailto:jemaxwell@jaymax.com">Joseph 
  Maxwell</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=questions@FreeBSD.ORG 
  href="mailto:questions@FreeBSD.ORG">questions@FreeBSD.ORG</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, June 19, 2002 
10:25</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Problems w/ Semaphore - I'm in 
  'jail'</DIV>
  <DIV><BR></DIV>Hello, <BR>Hope there are users in this group w/ PostgreSQL 
  familiarity and this BSD interaction <BR>I am setting up postgreSQL and have 
  ran into a problem related to either <BR>kernel config or operating within 
  'the jail'. 
  <P>Some interactions w/ the postgresql user groups ==&gt; 
  <P>Systems:&nbsp; PostgreSQL version 7.2.1, with all default settings on a 
  <BR>&nbsp; BSD platform&nbsp; ,4.5-RELEASE FreeBSD. <BR>&nbsp; 
  <BLOCKQUOTE>&nbsp; hostname# initdb -D /usr/local/pgsql/data 
    <BR>&nbsp;&nbsp; The files belonging to this database system will be owned 
    by user "postgres". <BR>&nbsp;&nbsp; This user must also own the server 
    process. 
    <P>&nbsp;&nbsp; Fixing permissions on existing directory 
    /usr/local/pgsql/data... ok <BR>&nbsp;&nbsp; creating directory 
    /usr/local/pgsql/data/base... ok <BR>&nbsp;&nbsp; creating directory 
    /usr/local/pgsql/data/global... ok <BR>&nbsp;&nbsp; creating directory 
    /usr/local/pgsql/data/pg_xlog... ok <BR>&nbsp;&nbsp; creating directory 
    /usr/local/pgsql/data/pg_clog... ok <BR>&nbsp;&nbsp; creating template1 
    database in /usr/local/pgsql/data/base/1... <BR>&nbsp;&nbsp; 
    IpcSemaphoreCreate: semget(key=1, num=17, 03600) failed: Function not 
    implemented 
    <P>&nbsp;&nbsp; initdb failed. <BR>&nbsp;</P></BLOCKQUOTE>&nbsp;&nbsp; Any 
  ideas on the semget() function, remembered reading on it somewhere before but 
  <BR>&nbsp;&nbsp; can't remember where <BR>&nbsp;&nbsp; I hope this does not 
  call for a kernel rebuild <BR>&nbsp;&nbsp; I did an ipcs -s which ===&gt; 
  <BR>&nbsp; 
  <BLOCKQUOTE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname# ipcs -s 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Semaphores: 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T&nbsp;&nbsp;&nbsp;&nbsp; 
    ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp; GROUP 
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hostname# 
  <BR>&nbsp;</P></BLOCKQUOTE>&nbsp;&nbsp; Any insight on this type of problem? 
  <P>Response ===&gt; <BR>&nbsp; <B>Hmm, usually this means either the kernel's 
  not configured for SYSV ipc</B> <BR><B>&nbsp; or that you're running in a jail 
  and the sysctl to let the jail use</B> <BR><B>&nbsp; sysv ipc is not turned 
  on.</B> <BR>&nbsp; 
  <P>Is this a plausible explanation, &amp; if it is that&nbsp; the kernel's not 
  configured for SYSV ipc <BR>or that I am running in a jail how can the sysctl 
  be turned on to allow the jail to use sysv ipc? 
  <P>&nbsp;Thanks 
  <P>I've spoken w/ my ISP, Tech. support personnel not quite familiar w/ 
  problem but promised to investigate. <BR>Any other experienced opinions 
  welcomed ... 
  <P>---&nbsp;&nbsp; Joe&nbsp;&nbsp; --- <BR>&nbsp; <BR>&nbsp; <BR>&nbsp; 
</P></BLOCKQUOTE></BODY></HTML>

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