BrokenPipeError when details of service get huge (Bug?)

CMK version: 2.3.0p35
OS version: Ubuntu 22.04

Error message: Broken Pipe

In the file lib/python3/cmk/checkengine/submitters.py on line 213 (pipe.flush) we get an BrokenPipeError when the details of a service get huge. My workaround is as follows (reopening the Pipe):


try:
    pipe.write(msg.encode())
    # Important: Nagios needs the complete command in one single write() block!
    # Python buffers and sends chunks of 4096 bytes, if we do not flush.
    pipe.flush()
except BrokenPipeError as e:
    pipe = PipeSubmitter._open_command_pipe()

The original code is as follows:

pipe.write(msg.encode())
# Important: Nagios needs the complete command in one single write() block!
# Python buffers and sends chunks of 4096 bytes, if we do not flush.
pipe.flush()

Is there a better way than this in order to fix this issue?

Hi,

are we the only Checkmk users who face this issue.


Erwin

How huge are the details?
100 lines, 1000, more?

Different per Service. We have approximately 1600 Services. The Details of each service have more then 100 Lines. I’m going to check the detail lines and will come back with a more exact number.

The number of detail lines is not that much. Max 4 lines per service.