During the past few months our Icinga2 master has had issues with the /var/log/icinga2/icinga2.log file filling up with
“Critical/ApiListener: Cannot accept new connection: Too many open files”
The limit was increased but we hit the same issue a few days later.
Our current work around is to move the large log file (41GB) to another disk area and zero the log file for icinga2. Then restart icinga2.
The issue is still re-occurring and the last time was yesterday 19th May 2024
Give as much information as you can, e.g.
-
Version used (
icinga2 --version) … Version r2.13.7-1 -
Operating System and version … CentOS Linux release 7.9.2009 (Core)
-
Enabled features (
icinga2 feature list)
… icinga2 feature list
Disabled features: command compatlog debuglog elasticsearch gelf graphite ido-mysql influxdb influxdb2 livestatus opentsdb opsgenie perfdata statusdata syslog
Enabled features: api checker icingadb mainlog notification -
Icinga Web 2 version and modules (System - About)
… The icinga2web runs on a separate server.
Icinga2 Versions is the same as above -
Config validation (
icinga2 daemon -C)
When run this is green without any errors
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 NotificationComponent.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 CheckerComponent.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 2 UserGroups.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 33 TimePeriods.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 45 Users.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1859 Services.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1287 ServiceGroups.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 7 ScheduledDowntimes.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 153 Zones.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 6 NotificationCommands.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 2476 Notifications.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 96 Hosts.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 33 HostGroups.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 24 Comments.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 5 EventCommands.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 7 Downtimes.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 111 Endpoints.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 FileLogger.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 2 ApiUsers.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 335 CheckCommands.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 ApiListener.
[2024-05-20 10:34:51 +0100] information/ConfigItem: Instantiated 1 IcingaDB.
[2024-05-20 10:34:51 +0100] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
[2024-05-20 10:34:51 +0100] information/cli: Finished validating the configuration file(s). -
If you run multiple Icinga 2 instances, the
zones.conffile (oricinga2 object list --type Endpointandicinga2 object list --type Zone) from all affected nodes
Only the master server has this issue at the moment.
object Endpoint “monitor04.dion.aws” {
}
object Endpoint “monitor05.dion.aws” {
host = “monitor05.dion.aws”
}
object Zone “master” {
endpoints = [ “monitor04.dion.aws”, “monitor05.dion.aws” ]
}
include “/opt/primary-ic2-01/ic2/zones.conf”
The clustered server monitor05 does not have the same issue.