Bug #502
Can Not Create Shared Memory Segment in FreeNAS Jail
Status:
Closed
Priority:
Normal
Assignee:
Category:
Jails / Containers
Target version:
Description
I cam across a problem while setting up a PostgreSQL database server inside of a FreeNAS jail. The problem occurred after I installed the package and went to initialize the database.
- I initialized the database with the following command:
service postgresql initdb
- However the process failed with the following error
creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL: could not create shared memory segment: Function not implemented DETAIL: Failed system call was shmget(key=1, size=48, 03600). child process exited with exit code 1 initdb: removing data directory "/usr/local/pgsql/data"
- However the process failed with the following error
- After searching around a bit I found that I needed to add the following sysctl value during the jail's creation:
allow.sysvipc=true
- Or from the shell, alternatively:
warden set flags <jail_name> allow.sysvipc=true
- Or from the shell, alternatively: