Open manugu87 opened 2 years ago
change ulimit for docker container:
--ulimit nofile=
On my system nofile is already unlimited, but I got the same error running docker on PhotonOS. Running docker on another Ubuntu maschine, nagios works fine. Any other idea?
Changing the ulimit didn't work for me either. I think docker might have changed something recently which is breaking the container. I'm using Arch Linux my versions below.
$ docker version
Client:
Version: 23.0.1
API version: 1.42
Go version: go1.20
Git commit: a5ee5b1dfc
Built: Sat Feb 11 13:58:04 2023
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.20
Git commit: bc3805a0a0
Built: Sat Feb 11 13:58:04 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.6.18
GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640.m
runc:
Version: 1.1.4
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ uname -a
Linux xxx 5.15.94-1-lts #1 SMP Wed, 15 Feb 2023 07:09:02 +0000 x86_64 GNU/Linux
I am building Nagios in Docker from master but I also tried a release from back in April with the same results.
Sorry, I forgot to post my solution of the issue. The problem is, that NOFILE is much too high and nagios tries to allocate an array of this size and fails. I just added "--ulimit nofile=32768:32768" to my docker run command and that works for me.
Setting the ulimits nofile worked for me once I applied it to the correct container. Bravo!
In my docker-compose.yml
I did:
ulimits:
nofile:
soft: 32768
hard: 32768
The solution in this topic should be on the main page of this project !
After upgrading my virtual machine from Oracle Linux 7 to Oracle Linux 9 i faced the same issue and had to set the "ulimit" parameter on the CLI. This fixed the issue (for now). It took me some time to find this thread here and i do agree that this might be something for the README.md
docker run --name $CONTAINER_NAME \
--ulimit nofile=65535:65535 \
-d \
-v nagiosgraphrrd:/opt/nagiosgraph/var/rrd \
-p 8080:80 \
$IMAGE_NAME
docker pull jasonrivers/nagios:latest docker run --name nagios4 -p 0.0.0.0:8080:80 jasonrivers/nagios:latest
I don´t found any resolution, ¿can you help me?
Started runsvdir, PID is 11 checking permissions for nagios & nagiosgraph rsyslogd: [origin software="rsyslogd" swVersion="8.2001.0" x-pid="19" x-info="https://www.rsyslog.com"] start
Nagios Core 4.4.6 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 2020-04-28 License: GPL
Website: https://www.nagios.org Error: Failed to create IO broker set: Cannot allocate memory