Xymon Mailing List Archive search

Startup problem on FreeBSD

6 messages in this thread

list Arnoud Post · Sun, 29 May 2005 20:48:40 +0200 ·
I have just installed version 4.0.4 for the first time. I'm running FreeBSD 5.3 on Intel.

When I startup Hobbit I don't get the html pages, just a few directories. I'm really without any 
clue right now, so I hope someone out here can help me on this one.

Looking at de logfile gives:
2005-05-29 20:25:14 Task hobbitd started with PID 43892
2005-05-29 20:25:14 Loading hostnames
2005-05-29 20:25:14 Loading saved state
2005-05-29 20:25:14 Cannot access checkpoint file /usr/local/bb/server/tmp/hobbitd.chk for restore
2005-05-29 20:25:14 Setting up network listener on 0.0.0.0:1984
2005-05-29 20:25:14 Setting up signal handlers
2005-05-29 20:25:14 Setting up hobbitd channels
2005-05-29 20:25:14 Could not get sem: No space left on device
2005-05-29 20:25:14 Cannot setup status channel
2005-05-29 20:25:14 Task hobbitd terminated, status 1

ps -aux |grep hobbit gives:
hobbit   43877  0.0  0.2  1284  812  ??  Ss    8:24PM   0:00.03 
/usr/local/bb/server/bin/hobbitlaunch --config=/usr/loc
So I'm missing a whole bunch of processes.

And last but not least because of the logfile I checked my filesystem:
df -h:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    248M     49M    179M    21%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s1e    1.9G     32M    1.7G     2%    /tmp
/dev/ad0s1f    107G    6.3G     92G     6%    /usr
/dev/ad0s1d    1.9G    120M    1.7G     7%    /var
linprocfs      4.0K    4.0K      0B   100%    /usr/compat/linux/proc
devfs          1.0K    1.0K      0B   100%    /usr/local/psa/named/run-root/dev

I checked the tmp dir, it is empty. I tried linking it to a directory on another slice, which gave 
the same effect.

Grtz,
Arnoud Post
list Henrik Størner · Sun, 29 May 2005 22:20:45 +0200 ·
quoted from Arnoud Post
On Sun, May 29, 2005 at 08:48:40PM +0200, Arnoud Post wrote:
I have just installed version 4.0.4 for the first time. I'm running FreeBSD 
5.3 on Intel.
2005-05-29 20:25:14 Task hobbitd started with PID 43892
2005-05-29 20:25:14 Setting up hobbitd channels
2005-05-29 20:25:14 Could not get sem: No space left on device
2005-05-29 20:25:14 Cannot setup status channel
2005-05-29 20:25:14 Task hobbitd terminated, status 1
That's a first - I've never seen this error before.

The problem is with one of the FreeBSD kernel parameters
controlling the number of "semaphores" available on this system.
Hobbit uses 6 sets of semaphores, each set contains 3 semaphores,
so a total of 18 semaphores.

Try running the command "sysctl -a | grep kern.ipc.sem" to check what 
the kernel limits are for semaphores. The interesting values are
the "kern.ipc.semmni" (the number of semaphore sets available),
and "kern.ipc.semmns" (the total number of semaphores). On my
FreeBSD 4.10 box, those are set at 10 and 60, respectively - and
as expected Hobbit runs fine with that. But this is a global ressource, 
so there may be other applications on your box that use semaphores 
("ipcs -s -a" as root will show you that).

I don't know enough about FreeBSD to help you with changing these
parameters - Google'ing a bit for "FreeBSD+kern.ipc.semmni" indicates
that this also needs tuning if you run PostgreSQL.


Regards,
Henrik
list Arnoud Post · Sun, 29 May 2005 22:47:14 +0200 ·
Thanks Henrik,

I think it's getting even more difficult looking at the following output:
morpheus# sysctl -a | grep kern.ipc.sem
kern.ipc.semmap: 30
kern.ipc.semmni: 10
kern.ipc.semmns: 60
kern.ipc.semmnu: 30
kern.ipc.semmsl: 60
kern.ipc.semopm: 100
kern.ipc.semume: 10
kern.ipc.semusz: 92
kern.ipc.semvmx: 32767
kern.ipc.semaem: 16384
morpheus# ipcs -s -a
Semaphores:
T     ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP NSEMS    OTIME    CTIME
s  65536    5432001 --rw------- postgres postgres postgres postgres     17 23:21:27 23:21:27
s  65537    5432002 --rw------- postgres postgres postgres postgres     17 23:21:27 23:21:27
s  65538    5432003 --rw------- postgres postgres postgres postgres     17 23:21:27 23:21:27
s  65539   17897355 --rw-------    10010       bb    10010       bb      3 no-entry 16:31:29
s  65540   34674571 --rw-------    10010       bb    10010       bb      3 no-entry 16:31:29
s  65541   51451787 --rw-------    10010       bb    10010       bb      3 no-entry 16:31:29

I'll have a go at google with your info...
quoted from Henrik Størner


Henrik Stoerner wrote:
On Sun, May 29, 2005 at 08:48:40PM +0200, Arnoud Post wrote:
I have just installed version 4.0.4 for the first time. I'm running FreeBSD 
5.3 on Intel.
2005-05-29 20:25:14 Task hobbitd started with PID 43892
2005-05-29 20:25:14 Setting up hobbitd channels
2005-05-29 20:25:14 Could not get sem: No space left on device
2005-05-29 20:25:14 Cannot setup status channel
2005-05-29 20:25:14 Task hobbitd terminated, status 1

That's a first - I've never seen this error before.

The problem is with one of the FreeBSD kernel parameters
controlling the number of "semaphores" available on this system.
Hobbit uses 6 sets of semaphores, each set contains 3 semaphores,
so a total of 18 semaphores.

Try running the command "sysctl -a | grep kern.ipc.sem" to check what 
the kernel limits are for semaphores. The interesting values are
the "kern.ipc.semmni" (the number of semaphore sets available),
and "kern.ipc.semmns" (the total number of semaphores). On my
FreeBSD 4.10 box, those are set at 10 and 60, respectively - and
as expected Hobbit runs fine with that. But this is a global ressource, 
so there may be other applications on your box that use semaphores 
("ipcs -s -a" as root will show you that).

I don't know enough about FreeBSD to help you with changing these
parameters - Google'ing a bit for "FreeBSD+kern.ipc.semmni" indicates
that this also needs tuning if you run PostgreSQL.


Regards,
Henrik

list Henrik Størner · Sun, 29 May 2005 22:52:15 +0200 ·
Hi Arnoud,
quoted from Arnoud Post

On Sun, May 29, 2005 at 10:47:14PM +0200, Arnoud Post wrote:
I think it's getting even more difficult looking at the following output:
morpheus# sysctl -a | grep kern.ipc.sem

kern.ipc.semmni: 10
kern.ipc.semmns: 60
quoted from Arnoud Post
morpheus# ipcs -s -a
Semaphores:
T     ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP NSEMS   s  65536    5432001 --rw------- postgres postgres postgres postgres     17 s  65537    5432002 --rw------- postgres postgres postgres postgres     17 s  65538    5432003 --rw------- postgres postgres postgres postgres     17 s  65539   17897355 --rw-------    10010       bb    10010       bb      3 s  65540   34674571 --rw-------    10010       bb    10010       bb      3 s  65541   51451787 --rw-------    10010       bb    10010       bb      3 
OK, so I think you're hitting the "kern.ipc.semmns" limit of 60 - that
does match the output from ipcs (3x17 for postgres, 3x3 for bb - Hobbit
- gives 60. So some of the Hobbit ones are missing).
I'll have a go at google with your info...
This is the best one I've found yet. The kern.ipc.sem* sysctl settings
are "read-only", so apparently they can only be modified upon a reboot,
by listing them in /boot/loader.conf:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-sysctl.html


Regards,
Henrik
list Henrik Størner · Sun, 29 May 2005 20:59:58 +0000 (UTC) ·
quoted from Henrik Størner
In <user-4f7964245618@xymon.invalid> user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) writes:
This is the best one I've found yet. The kern.ipc.sem* sysctl settings
are "read-only", so apparently they can only be modified upon a reboot,
by listing them in /boot/loader.conf:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-sysctl.html

Just tried it, and adding a line with

  kern.ipc.semmns="100"

to /boot/loader.conf and rebooting increases this setting. So I'd suggest
taking the output from "sysctl kern.ipc.semmns", add 18 to the current
value, and put that into /boot/loader.conf. Same for the kern.ipc.semmni
value - increase that by 6.

That should cover what Hobbit needs.


Regards,
Henrik
list Arnoud Post · Sun, 29 May 2005 23:06:12 +0200 ·
I've changed semmni to 20 and semmns to 100... works like a charm!

Thanks for your help Henrik!

morpheus# hobbitstart
Hobbit started
morpheus# cd /var/log/hobbit/
morpheus# ls -la
total 52
drwxr-xr-x  2 hobbit  hobbit    512 May 29 23:03 .
drwxr-xr-x  5 root    wheel    1536 May 29 22:00 ..
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 acknowledge.log
-rw-r--r--  1 hobbit  hobbit     55 May 29 23:03 bb-display.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 bb-network.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 bb-retest.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 bbcombotest.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 history.log
-rw-r--r--  1 hobbit  hobbit     35 May 29 23:03 hobbitd.log
-rw-r--r--  1 hobbit  hobbit      4 May 29 23:03 hobbitd.pid
-rw-r--r--  1 hobbit  hobbit  39411 May 29 23:03 hobbitlaunch.log
-rw-r--r--  1 hobbit  hobbit      4 May 29 23:03 hobbitlaunch.pid
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 larrd-data.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 larrd-status.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 notifications.log
-rw-r--r--  1 hobbit  hobbit      0 May 29 23:03 page.log
quoted from Henrik Størner


Henrik Stoerner wrote:
Hi Arnoud,

On Sun, May 29, 2005 at 10:47:14PM +0200, Arnoud Post wrote:
I think it's getting even more difficult looking at the following output:
morpheus# sysctl -a | grep kern.ipc.sem
kern.ipc.semmni: 10
kern.ipc.semmns: 60
morpheus# ipcs -s -a
Semaphores:
T     ID     KEY        MODE       OWNER    GROUP  CREATOR   CGROUP NSEMS   s  65536    5432001 --rw------- postgres postgres postgres postgres     17 s  65537    5432002 --rw------- postgres postgres postgres postgres     17 s  65538    5432003 --rw------- postgres postgres postgres postgres     17 s  65539   17897355 --rw-------    10010       bb    10010       bb      3 s  65540   34674571 --rw-------    10010       bb    10010       bb      3 s  65541   51451787 --rw-------    10010       bb    10010       bb      3 

OK, so I think you're hitting the "kern.ipc.semmns" limit of 60 - that
does match the output from ipcs (3x17 for postgres, 3x3 for bb - Hobbit
- gives 60. So some of the Hobbit ones are missing).

I'll have a go at google with your info...

This is the best one I've found yet. The kern.ipc.sem* sysctl settings
are "read-only", so apparently they can only be modified upon a reboot,
by listing them in /boot/loader.conf:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-sysctl.html


Regards,
Henrik