Op 15-3-2011 10:08, Stef Coene schreef:
On Tuesday 15 March 2011, Paul van Eldijk wrote:
Op 14-3-2011 17:43, Henrik Størner schreef:
I would like to run 2 xymon-4.3.0 servers on 1 host (one for testing, one for production), each with its own user (xymon vs xymontst) and port (1984 vs. 1985). The problem is, that I get an error-message when starting the second server:
"Could not get shm of size 262144: Permission denied"
This is one of the more obscure parts of the SysV IPC specs, but it basically boils down to this: Make sure the two Xymon servers have different XYMONHOME directories, and it should work OK.
I must be missing something...
I've got 2 users: uid=104(xymon) gid=501(beheer) groups=501(beheer), home directory (=install directory): /data/xymon
uid=105(xymontst) gid=501(beheer) groups=501(beheer), home directory: /data/tstxymon
Each user has a different XYMONHOME:
/data/xymon/server/etc/xymonserver.cfg:XYMONHOME="/data/xymon/server"
/data/tstxymon/server/etc/xymonserver.cfg:XYMONHOME="/data/tstxymon/server"
(For details, look up the documentation on your systems' "ftok" function).
according to the documentatiop of 'ftok' this should be working..
Wat am I missing? You can display shared memory usage with: ipcs -m This is normally per user, so if you use different users, it shoud work.
I had some shared memory problems before, but that was caused by using the same user. Maybe some shared memory is locked? You can clean it up with the ipcrm command.
Alas, but xymontst has no shared memory allocated:
ipcs
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x01100008 0 xymon 600 262144 2 0x02100008 32769 xymon 600 262144 2 0x03100008 65538 xymon 600 262144 2 0x04100008 98307 xymon 600 262144 2 0x05100008 131076 xymon 600 262144 1 0x06100008 163845 xymon 600 32768 1 0x07100008 196614 xymon 600 524288 2 0x08100008 229383 xymon 600 524288 2 0x09100008 262152 xymon 600 131072 1 0x68100016 294921 zabbix 666 8421519 25 0x78100016 327690 zabbix 666 16777627 25 0x74100016 360459 zabbix 666 4194702 25 0x67100016 393228 zabbix 666 7130317 25 0x73100016 425997 zabbix 666 1258291 25
------ Semaphore Arrays -------- key semid owner perms nsems 0x00000000 0 root 600 1 0x00000000 98305 root 600 1 0x00000000 229378 apache 600 1 0x00000000 851971 apache 600 1 0x00000000 884740 apache 600 1 0x01100008 393221 xymon 600 3 0x02100008 425990 xymon 600 3 0x03100008 458759 xymon 600 3 0x04100008 491528 xymon 600 3 0x05100008 524297 xymon 600 3 0x06100008 557066 xymon 600 3 0x07100008 589835 xymon 600 3 0x08100008 622604 xymon 600 3 0x09100008 655373 xymon 600 3 0x7a100016 753678 zabbix 666 7
------ Message Queues -------- key msqid owner perms used-bytes messages
So the problem must be somewhere else, I'm guessing...
Paul