Problem with shell managment in jail

Status
Not open for further replies.

James Random

Dabbler
Joined
Jun 22, 2014
Messages
12
Hi all,

I have freenas (9.2.1.5) up and running thanks to the good documentation (much better than a lot of OSS projects!) and excellent advice I have picked up from the forum. It is working well as a fileserver/backup.

I have just created a standard FreeBSD jail to use as a general purpose *nix machine. A few programs produce the error message:

shmget() failed: Function not implemented
Disabling shared memory tile transport

Looking around, a few people have had a similar problem with FreeBSD/FreeNAS (mainly when trying to run PostgreSQL, which isn't waht I am doing). One of the suggested fixes is to set security.jail.sysvipc_allowed to 1 in a sysctl. I have tried this and it doesn’t work.

There were also (conflicting) suggestions to put this in rc.conf:
jail_sysvipc_allow="YES"

I did that (by editing /conf/base/etc/rc.conf) but it didn’t fix it.

After reading this bug report (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=173469), I changed that to:
jail_example_parameters="allow.sysvipc=1"

That doesn’t work either (which is OK, because there doesn’t seem to be a good way of making permanent changes to rc.conf).

Another suggestion was to run:
jail -m jid=3 allow.sysvipc=1

That works when I run it from the command line. So I tried putting the command in as an Init Script (with complete paths) set to run Post Init:
/usr/sbin/jail -m jid=`/usr/sbin/jls -j FreeBSD jid` allow.sysvipc=1

That doesn’t work (I guess it is getting run too early, before the jail is started, or something).

Any idea why these don't work? Any other suggestions to work around this? (This isn’t vitally important, but I have learnt a lot about FreeBSD and FreeNAS by trying to figure it out...)
 

James Random

Dabbler
Joined
Jun 22, 2014
Messages
12
Yeah, I know. The thread title is wrong.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I do remember this problem. Unfortunately I don't have much advice. To be honest you might want to try the FreeBSD forums or IRC. FreeNAS' jail is not really any different from the FreeBSD jail and I'd like to think that people do what you do on the FreeBSD forum in a jail. Most people around here don't do heavy lifting in the jail and therefore the number of people that are using PostgreSQL in this forum can probably be counted on one hand.

If you are okay with running it in a VM you could consider going with virtualbox. I realize it's not going to be as fast, but it should work. Sometimes you have to settle for what works over what is fastest.

You also may have luck if you jump in our IRC channel between 8pm and midnight EST. The CTO of iXsystems gets in there and listens in and he may have the answer(username jkh). As he has a big face in the FreeBSD world you might know of him.. Jordan Hubbard.

*If* you do get it working I'd ask that you post the solution here. There's very few people that use postgresql in jails, but the answer might be useful to someone someday.
 

James Random

Dabbler
Joined
Jun 22, 2014
Messages
12
Thanks for the reply. I'll try the FreeBSD forums if I can't figure it out after a bit more tinkering....
 
Status
Not open for further replies.
Top