PostgreSQL in FreeBSD jails
Hi, I need to run a number of PostgreSQL servers in different FreeBSD jails. I managed to run a first instance of PostgreSQL server in a jail, but after I launch a new server in another jail the first one starts to return an error messages like the following: semctl(1507328, 4, SETVAL, 0) failed: Invalid argument The problem in general is: only one instance of PostgreSQL server processes clients' connections, all of the others return semctl errors. The system is FreeBSD 5.4-PRERELEASE. PostgreSQL-7.4.7. SEM and SHM sysctl setting are: # sysctl -a | grep shm kern.ipc.shmmax: 1 kern.ipc.shmmin: 1 kern.ipc.shmmni: 192 kern.ipc.shmseg: 128 kern.ipc.shmall: 32768 kern.ipc.shm_use_phys: 0 kern.ipc.shm_allow_removed: 0 # sysctl -a | grep sem kern.ipc.semmap: 256 kern.ipc.semmni: 256 kern.ipc.semmns: 512 kern.ipc.semmnu: 256 kern.ipc.semmsl: 60 kern.ipc.semopm: 100 kern.ipc.semume: 10 kern.ipc.semusz: 92 kern.ipc.semvmx: 32767 kern.ipc.semaem: 16384 Trying to solve the problem I've set the following in postgresql.conf files: max_connections = 5 shared_buffers = 100 Please help! What am I doing wrong? -- Alexander Rusinov ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: PostgreSQL in FreeBSD jails
Spartak Radchenko wrote: On Tue, Apr 26, 2005 at 05:58:27PM +0300, Alexander Rusinov wrote: Hi, I need to run a number of PostgreSQL servers in different FreeBSD jails. Is SYSV IPC allowed for jails? It's not enabled by default. Yes, it is on: security.jail.sysvipc_allowed: 1 I wouln't be able to run the first instance of PostgreSQL server with IPC disabled. -- Alexander Rusinov ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: PostgreSQL in FreeBSD jails
Renato Botelho wrote: On 26/04/05, Alexander Rusinov <[EMAIL PROTECTED]> wrote: Hi, I need to run a number of PostgreSQL servers in different FreeBSD jails. I managed to run a first instance of PostgreSQL server in a jail, but after I launch a new server in another jail the first one starts to return an error messages like the following: semctl(1507328, 4, SETVAL, 0) failed: Invalid argument The problem in general is: only one instance of PostgreSQL server processes clients' connections, all of the others return semctl errors. The system is FreeBSD 5.4-PRERELEASE. PostgreSQL-7.4.7. SEM and SHM sysctl setting are: Just add the following line to your /etc/rc.conf jail_sysvipc_allow="YES" and ipc configuration will be shared with the jails I have IPC enabled for jails already. So unfortunately this is not a solution. Is anybody here who do run several jailed PostgreSQL servers? -- Alexander Rusinov ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: PostgreSQL in FreeBSD jails
Marc G. Fournier wrote: On Tue, 26 Apr 2005, Bill Moran wrote: Alexander Rusinov <[EMAIL PROTECTED]> wrote: Hi, I need to run a number of PostgreSQL servers in different FreeBSD jails. I managed to run a first instance of PostgreSQL server in a jail, but after I launch a new server in another jail the first one starts to return an error messages like the following: semctl(1507328, 4, SETVAL, 0) failed: Invalid argument The problem in general is: only one instance of PostgreSQL server processes clients' connections, all of the others return semctl errors. I had this exact same problem. I never found a solution. The cause appears to be that, since shared memory is not segregated between jails, the newly launched Postgres instances corrupt the shared memory of previously running Postgres instances. I'm running 9 jails on a server right now, each with their own instance: and never noticed any issues ... but, this is with 4.11, not 5.x, so maybe something has changed? Can you tell please what version of PostgreSQL are you running? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: PostgreSQL in FreeBSD jails
Just add the following line to your /etc/rc.conf jail_sysvipc_allow="YES" and ipc configuration will be shared with the jails I have IPC enabled for jails already. So unfortunately this is not a solution. Is anybody here who do run several jailed PostgreSQL servers? AFAIR PostgreSQL generates the shared memory identifier based on the port it is runing on. It is possible to run two instances of PostgreSQL on different ports, so it should work if they are in seperate jails. Actually, I'm using unix sockets for those servers so I never thought about changing the port number. But now I tried and ... that helped! Thank you! I guess this is a workaround but not a solution though. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: save-entropy errors on jail after update to 5.4-RELEASE
Renato Botelho wrote: I updated my box and a jail that runs inside this box to 5.4-RELEASE yesterday. After it, I'm receiving emails from this jail with error messages about /usr/libexec/save-entropy I'm receiving messages like this: mv: /var/db/entropy/saved-entropy.7: No such file or directory mv: /var/db/entropy/saved-entropy.5: No such file or directory override r operator/operator for /var/db/entropy/saved-entropy.5? (y/n [n]) not overwritten override r operator/operator for /var/db/entropy/saved-entropy.4? (y/n [n]) not overwritten override r operator/operator for /var/db/entropy/saved-entropy.3? (y/n [n]) not overwritten override r operator/operator for /var/db/entropy/saved-entropy.2? (y/n [n]) not overwritten here is the files inside the jail: [EMAIL PROTECTED]:~> sudo ls -l /var/db/entropy/ total 16 -r 1 operator operator 2048 May 11 10:33 saved-entropy.1 -r 1 operator operator 2048 May 11 10:33 saved-entropy.2 -r 1 operator operator 2048 May 11 10:22 saved-entropy.3 -r 1 operator operator 2048 May 11 10:22 saved-entropy.4 -r 1 operator operator 2048 May 11 10:11 saved-entropy.5 -r 1 operator operator 2048 May 11 10:11 saved-entropy.6 -r 1 operator operator 2048 May 11 10:00 saved-entropy.7 -r 1 operator operator 2048 May 11 10:00 saved-entropy.8 Anybody could help me to fix it? thanks in advance I suspect this happens because of concurrent access to /dev/random from multiple save-entropy scripts launched exactly as the same time by jailed cron daemons. I got rid of those emails by putting entropy_dir="NO" into rc.conf of all jails. I'm not shure, is this secure? Also consider enabling cron time jitter for jailed crons, by putting something like this into jail rc.conf: cron_flags="-J10" -- Alexander Rusinov ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"