Error in decoding UTF8 character crashes Check_MK

Hi,

using 1.6.0p8 raw edition I’m having an issue apparentally related with special characters on some hardrives… It started with one, but now every new server added seems to be having this issue…

The crash report says this:
Exception:
UnicodeDecodeError ('ascii' codec can't decode byte 0xc2 in position 8: ordinal not in range(128))

Traceback:
File “/omd/sites/prod/lib/python/cmk_base/decorator.py”, line 54, in wrapped_check_func
status, infotexts, long_infotexts, perfdata = check_func(hostname, *args, **kwargs)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 111, in do_check
_do_all_checks_on_host(sources, host_config, ipaddress, only_check_plugin_names)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 247, in _do_all_checks_on_host
service.description)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 367, in execute_check
cache_interval=largest_interval)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 586, in _submit_check_result
_do_submit_to_core(host, servicedesc, state, infotext + perftext, cached_at, cache_interval)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 616, in _do_submit_to_core
_submit_via_check_result_file(host, service, state, output)
File “/omd/sites/prod/lib/python/cmk_base/checking.py”, line 640, in _submit_via_check_result_file
“”" % (host, cmk_base.utils.make_utf8(service), now, now, state, cmk_base.utils.make_utf8(output)))

Local Variables:
{‘host’: u’mirror97-apk’,
‘now’: 1579524781.729417,
‘output’: u’OK - 30 \xb0C|temp=30;45;50;;’,
‘service’: u’Temperature SMART TOSHIBA_DT01ACA200_23L64JLAS’,
‘state’: 0}

The client agent seems to return all ok, the issue seems to be on the check_mk server when parsing some characters.
The server is installed in Ubuntu 18.04, it has python2.7 as default, although python3 is also installed.

Could someone help?

Thanks a lot in advance

Is all the rest working ? Was that after upgrade to 1.6 version ?

What’s your locale settings (Operating System) ?
Can you check and therefor update language to UTF-8 ?

Hi Ricardo,

all the rest is working fine, it’s only on some servers (8 for now in more than 400)… But it only happens on some of our latest servers.

My Locale is:
root -> en_US.UTF-8
OMD -> C.UTF-8

So it’s on UTF-8 already…

Any more ideias?

Thanks for your help

\xb0C corresponds to º character … so if this is somehow a local check or any other type of plugin try to remove that character from the plugin.
CMK is probably not unicoding the output.
That would solve your problem.

Hi,

I removed all plugins from the host, leaving only the check_mk agent there (running the same version as the check_mk server), and it’s still crashing…

Any more ideas?

Thanks

The output from your first post looks like a plugin or a local check.
Cmk agent is all about checks, shouldn’t behave like that. Any cache you might still have?

I really don’t think so, at least not cache on the clients, because this happened on freshly installed servers, that hadn’t been added to check_mk before…