Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to create IO broker set: Cannot allocate memory #135

Open
manugu87 opened this issue Jun 28, 2022 · 7 comments
Open

Error: Failed to create IO broker set: Cannot allocate memory #135

manugu87 opened this issue Jun 28, 2022 · 7 comments

Comments

@manugu87
Copy link

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

@anobhask
Copy link

anobhask commented Sep 3, 2022

change ulimit for docker container:
--ulimit nofile=:

@tukey42
Copy link

tukey42 commented Dec 5, 2022

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?

@mariaa144
Copy link

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.

@tukey42
Copy link

tukey42 commented Feb 21, 2023

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.

@mariaa144
Copy link

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

@pathia
Copy link

pathia commented Mar 9, 2024

The solution in this topic should be on the main page of this project !

@phreakadelle
Copy link

phreakadelle commented Aug 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants