Shared Memory allocation in jail
Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. I have tuned my sysctl on master host as follow : kern.ipc.shmmax=268435456 kern.ipc.shmall=409600 kern.ipc.semmap=256 security.jail.allow_raw_sockets=1 security.jail.sysvipc_allowed=1 security.jail.enforce_statfs=1 No special tunning on jail host. I have also tunned in rc.conf jail_sysvipc_allow=YES I am still not able to start both at the same time. Any idea ? –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Shared Memory allocation in jail
Le 5 janv. 2012 à 14:56, bsd a écrit : Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. I have tuned my sysctl on master host as follow : kern.ipc.shmmax=268435456 kern.ipc.shmall=409600 kern.ipc.semmap=256 security.jail.allow_raw_sockets=1 security.jail.sysvipc_allowed=1 security.jail.enforce_statfs=1 No special tunning on jail host. I have also tunned in rc.conf jail_sysvipc_allow=YES I am still not able to start both at the same time. Any idea ? Infos here were helpful : http://www.freebsddiary.org/jail-multiple.php I have • re-configure /boot/loader.conf • configured sysctl.conf with various options # rebooted and the issue was solved. –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org –– - Grégory Bernard Director - --- www.osnet.eu --- -- Your provider of OpenSource appliances -- –– OSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetOSnetO ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Shared Memory allocation in jail
On Thu, Jan 5, 2012 at 8:56 AM, bsd b...@todoo.biz wrote: Hi, I am trying to run both postgres and zabbix in the same jail and I am only able to start postgres or zabbix not both of them. Yeah bro, it bit me in the ass as well ;-) the SysV IPC is common for the whole system. So anything that uses IPC in jails will have to go through this process You have to change the Pg user's id and the chown the Pg files. I use a nomeclature for this and is the last 3 digits of the jail's IP and the original uid. Example The jail on 192.168.101.124 has a Pg user of 70124 for port NATing I use the contrary nomenclature like 12480 is the network port 80 of the same jail in th public IP as 12480. Anyway here is my recipe: pw usermod pgsql -u 70124 pw groupmod pgsql -g 70124 chown -R pgsql /usr/local/pgsql/ chgrp -R pgsql /usr/local/pgsql/ When you run ipcs from the jail You should the see something like the example below, where there is still one Pg on uid 70 but from the jail's perspective it's the pgsql user who now has uid of 70124 Message Queues: T ID KEY MODEOWNERGROUP Shared Memory: T ID KEY MODEOWNERGROUP m 1179648 5432001 --rw--- 70 70 m 1310730 --rw--- 70 70 m 1572866 5432002 --rw--- pgsqlpgsql Semaphores: T ID KEY MODEOWNERGROUP s 1703936 5432001 --rw--- 70 70 s 1703937 5432002 --rw--- 70 70 s 1703938 5432003 --rw--- 70 70 s 1572867 5432004 --rw--- 70 70 s 1572868 5432005 --rw--- 70 70 s 1572869 5432006 --rw--- 70 70 s 1572870 5432007 --rw--- 70 70 s 1179655 5432008 --rw--- pgsqlpgsql s 1179656 5432009 --rw--- pgsqlpgsql s 1179657 5432010 --rw--- pgsqlpgsql s 1179658 5432011 --rw--- pgsqlpgsql s 1179659 5432012 --rw--- pgsqlpgsql s 1179660 5432013 --rw--- pgsqlpgsql s 1179661 5432014 --rw--- pgsqlpgsql Cheers, -- Alejandro Imass ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org