Wondering how to fix ‘Failed to register iobroker’ in Nagios. We can help you.
Often Nagios users come across this 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 Bobcares, we get requests from our customers to fix similar issues as a part of our Server Management Services.
Today let’s see how our Support Engineers fix this issue for our clients.
What causes ‘Failed to register iobroker’
Before going into the solution, we will see what causes this issue.
Following is the configuration for that particular check is
define service { service_description fan check_command check_cisco!snmpcommunitystring!bob@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 }
Following 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 can happen 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 fix this issue
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 assistance? We are happy to help you!]
Conclusion
In short, we saw how our Support Engineers fix this ‘Failed to register iobroker’ issue in Nagios for our customers.
0 Comments