×


Failed to register iobroker in Nagios - Solved

Are you looking for the solution to the Nagios error, Failed to register iobroker ?

This guide is for you.


Sometimes, Nagios users come across Failed to register iobroker error. Recently one of our customers reported that there was some issue with the Nagios check, as it didn't exit properly. Also, found 'Failed to register iobroker for stdout' in the logs.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve similar Nagios relates issues.


What triggers Nagios error 'Failed to register iobroker' ?

To troubleshoot this Nagios error, check the configuration below;

define service {
service_description fan
check_command check_cisco!snmpcommunitystring!ibmimedia@12
host_name SW-SRA-03
check_period 24x7 1/min 1/w
notification_period 24x7 1/min 1/w
contact_groups +admins,EuroFiber WAN
action_url /bob4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
max_check_attempts 10
check_interval 10
retry_interval 1
first_notification_delay 10
notification_interval 9999
notification_options w,u,c,r,f,s
active_checks_enabled 1
passive_checks_enabled 1
notifications_enabled 1
check_freshness 1
freshness_threshold 3600
event_handler_enabled 0
}

Below is the result when the above configuration check exits properly:

Current Status: OK (for 1d 12h 9m 7s)
Status Information: Fans: OK - 2 Fans are running all good
Performance Data: total=2 err=0
Current Attempt: 1/10 (HARD state)
Last Check Time: 01-04-2021 09:28:18
Check Type: ACTIVE
Check Latency / Duration: 0,000 / 0,000 seconds
Next Scheduled Check: 01-04-2021 09:38:18

However, sometimes the check may end abruptly, showing some strange Core Worker errors in the Nagios.log.

We can see the following in the log:

Failed to register iobroker for stdout
Failed to register iobroker for stderr

This occurs when the core worker is trying to get hold of stdout and stderr, but that fails. However is still launches the check, even though it will not be able to catch the output. 

At times, many different checks can fail at that time.

The following errors can be seen in the nagios.log file:

[1504231962] wproc: Core Worker 68003: Failed to register iobroker for stdout
[1504231962] wproc: Core Worker 68003: Failed to register iobroker for stderr
[1504231962] Warning: Check of host 'SOME_HOST' did not exit properly!
[1504231962] HOST ALERT: SOME_HOST;UNREACHABLE;SOFT;1;(Host check did not exit properly)

This problem occurs when custom operating system limits restrict the max number of processes that it can execute.

Generally, custom limits are defined in the /etc/security/limits.conf file.

Following is an example of limits in an openSUSE Leap 42.x:

# harden against fork-bombs
* hard nproc 1700
* soft nproc 1200
root hard nproc 3000
root soft nproc 1850


How to resolve Nagios error, Failed to register iobroker ?

We can fix this by increasing the hard and soft values as given n the following example:

># harden against fork-bombs
* hard nproc 10000
* soft nproc 10000
root hard nproc 10000
root soft nproc 10000

Once the changes are made, we need to reboot the system to ensure the limits are applied.


[Need urgent assistance in fixing Nagios errors? We are available to help you today. ]


Conclusion

This article covers how to resolve Nagios error, Failed to register iobroker. This problem can occur when custom operating system limits restrict the max number of processes that can be executed.


Custom limits are defined in the /etc/security/limits.conf file

You will need to increase the hard and soft values to resolve the problems you are experiencing, for example:

# harden against fork-bombs
*               hard    nproc           10000
*               soft    nproc           10000
root            hard    nproc           10000
root            soft    nproc           10000

 After making the changes it is recommended to reboot the operating system to ensure the limits are applied.

If the change does not fix the problem then you should increase the values again.