2.0.0b3 (CRE) [agent] Unsupported protocol version: b'/u'

Hi,

i get every x minutes the critical result "CRIT - [agent] Unsupported protocol version: b'/u'**CRIT** , Got no information from host, execution time 0.8 sec" on the CHECK_MK on my linux hosts. Next check is then ok, so the service is flapping continuously.

i think the encryption is the problem, see attached logfile.
renaming the client-config file /etc/check_mk/encryption.cfg to .bak did not help. I just deleted it -> it seems that this even does not help.

Setup -> Agents -> [Access to Agents] -> Encryption:

Password is set, encryption for Agent and for Realtime is set to: Enable (accept encrypted and unencrypted data)

is this a bug or can i do something to avoid this error?

OMD[]:~$ cmk --debug -vvI ..lan
Discovering services and host labels on: ..lan
..lan:

  • FETCHING DATA
    Source: SourceType.HOST/FetcherType.TCP
    [cpu_tracking] Start [7f068e5ee820]
    Connecting via TCP to 192.168.2.53:6556 (5.0s timeout)
    [TCPFetcher] Fetch with cache settings: DefaultAgentFileCache(path=PosixPath(’/omd/sites//tmp/check_mk/cache/..lan’), max_age=0, disabled=False, use_outdated=False, simulation=False, Cache enabled: True
    Not using cache (Too old. Age is 28 sec, allowed is 0 sec)
    [TCPFetcher] Execute data source
    Reading data from agent
    Output is encrypted
    Decrypt encrypted output
    Closing TCP connection to 192.168.2.53:6556
    [cpu_tracking] Stop [7f068e5ee820 - Snapshot(process=posix.times_result(user=0.010000000000000009, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.8299999982118607))]
    Try aquire lock on /omd/sites//var/check_mk/crashes/base/ceb47930-5419-11eb-9aab-4e99259a9cb8/crash.info
    Got lock on /omd/sites//var/check_mk/crashes/base/ceb47930-5419-11eb-9aab-4e99259a9cb8/crash.info
    Releasing lock on /omd/sites//var/check_mk/crashes/base/ceb47930-5419-11eb-9aab-4e99259a9cb8/crash.info
    Released lock on /omd/sites//var/check_mk/crashes/base/ceb47930-5419-11eb-9aab-4e99259a9cb8/crash.info
    Traceback (most recent call last):
    File “/omd/sites//lib/python3/cmk/fetchers/tcp.py”, line 167, in _real_decrypt
    protocol = int(output[:2])
    ValueError: invalid literal for int() with base 10: b’/u’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/omd/sites//bin/cmk”, line 85, in
exit_status = modes.call(mode_name, mode_args, opts, args)
File “/omd/sites//lib/python3/cmk/base/modes/init.py”, line 69, in call
return handler(*handler_args)
File “/omd/sites//lib/python3/cmk/base/modes/check_mk.py”, line 1515, in mode_discover
discovery.do_discovery(
File “/omd/sites//lib/python3/cmk/base/discovery.py”, line 367, in do_discovery
fetcher_messages=list(
File “/omd/sites//lib/python3/cmk/base/checkers/_checkers.py”, line 228, in fetch_all
raw_data = source.fetch()
File “/omd/sites//lib/python3/cmk/base/checkers/_abstract.py”, line 164, in fetch
return fetcher.fetch(self.mode)
File “/omd/sites//lib/python3/cmk/fetchers/_base.py”, line 221, in fetch
return result.OK(self._fetch(mode))
File “/omd/sites//lib/python3/cmk/fetchers/_base.py”, line 250, in _fetch
raw_data = self._fetch_from_io(mode)
File “/omd/sites//lib/python3/cmk/fetchers/tcp.py”, line 103, in _fetch_from_io
return self._validate_decrypted_data(self._decrypt(self._raw_data()))
File “/omd/sites//lib/python3/cmk/fetchers/tcp.py”, line 144, in _decrypt
output = self._real_decrypt(output)
File “/omd/sites//lib/python3/cmk/fetchers/tcp.py”, line 169, in _real_decrypt
raise MKFetcherError(“Unsupported protocol version: %r” % output[:2])
cmk.fetchers._base.MKFetcherError: Unsupported protocol version: b’/u’
OMD[]:~$

---- first bytes of the crash-file:
OMD[]:~$ cat /omd/sites//var/check_mk/crashes/base/16e49158-541b-11eb-abfd-4e99259a9cb8/crash.info
{“time”: 1610376088.816097, “os”: “buster”, “version”: “2.0.0b3”, “edition”: “cre”, “core”: “nagios”, “python_version”: “3.8.6 (default, Oct 22 2020, 16:42:50) \n[GCC 10.1.0]”, “python_paths”: ["/opt/omd/versions/2.0.0b3.cre/bin", “/omd/sites//local/lib/python3”, “/omd/sites//lib/python38.zip”, “/omd/sites//lib/python3.8”, “/omd/sites//lib/python3.8/lib-dynload”, “/omd/sites//lib/python3.8/site-packages”, “/omd/sites//lib/python3”], “id”: “16e49158-541b-11eb-abfd-4e99259a9cb8”, “crash_type”: “base”, “exc_type”: “MKFetcherError”, “exc_value”: “Unsupported protocol version: b’/u’”, “exc_traceback”: [["/omd/sites//bin/cmk", 85, “”, “exit_status = modes.call(mode_name, mode_args, opts, args)”], ["/omd/sites//lib/python3/cmk/base/modes/init.py", 69, “call”, “return handler(*handler_args)”], ["/omd/sites//lib/python3/cmk/base/modes/check_mk.py", 1515, “mode_discover”, “discovery.do_discovery(”], ["/omd/sites//lib/python3/cmk/base/discovery.py", 367, “do_discovery”, “fetcher_messages=list(”], ["/omd/sites//lib/python3/cmk/base/checkers/_checkers.py", 228, “fetch_all”, “raw_data = source.fetch()”], ["/omd/sites//lib/python3/cmk/base/checkers/_abstract.py", 164, “fetch”, “return fetcher.fetch(self.mode)”], ["/omd/sites//lib/python3/cmk/fetchers/_base.py", 221, “fetch”, “return result.OK(self._fetch(mode))”], ["/omd/sites//lib/python3/cmk/fetchers/_base.py", 250, “_fetch”, “raw_data = self._fetch_from_io(mode)”], ["/omd/sites//lib/python3/cmk/fetchers/tcp.py", 103, “_fetch_from_io”, “return self._validate_decrypted_data(self._decrypt(self._raw_data()))”], ["/omd/sites//lib/python3/cmk/fetchers/tcp.py", 144, “_decrypt”, “output = self._real_decrypt(output)”], ["/omd/sites//lib/python3/cmk/fetchers/tcp.py", 169, “_real_decrypt”, “raise MKFetcherError(“Unsupported protocol version: %r” % output[:2])”]], “local_vars”: "eyd…

Do you also get the error with the Generic/Vanilla agent ? What all you have baked so far ? Can you share the screenshot of your bakery rule for you agent ?

i use the raw version, so agent-bakery is not available.

i installed the vanilla agent, available on the url /check_mk/agents/check-mk-agent_2.0.0b3-1_all.deb

the only thing that i do is using “special” checks, for example creating a fileinfo.cfg in the /etc/check_mk dir to monitor the age and size of certain files of a host.

maybe a litte bit unusual: my hosts are all ipv4/6, so in hosts they are configured as IPv4/IPv6 dual-stack

let me know, if i can supply other information

On a Vanilla installation of 2.0.0b3 CRE, I am able to monitor a Linux host without any issues. Can you post your complete agent output ?

here you can find the output of check_mk_agent
check_mk_agent.txt (61.5 KB)

further changes i made:

  1. disabled the rule for the encryption of the agent output -> no effect
  2. deleted the rule for the encryption, now i get the following error:

“CRIT - [agent] Agent output is encrypted but encryption is disabled by configurationCRIT , Got no information from host, execution time 0.9 sec”

  1. verified that i have no /etc/check_mk/encryption.cfg

for some reason the server gets encrypted output of the agent.
How can i make sure, that the agent sends unencrypted data?

I’m seeing the same issue with my installation of 2.0.0b4
It always resolves itself after 1 minute but happens on different servers (only Linux!) in unregular timeperiods.
I’m also using the raw version with vanilla agents.

For example:

186 m [SERVER2] [Check_MK] OK - [agent] Version: 2.0.0b4, OS: linux, execution time 0.5 sec
187 m [SERVER2] [Check_MK] CRIT - [agent] Unsupported protocol version: b/uCRIT, Got no information from host, execution time 0.5 sec

228 m [SERVER1] [Check_MK] OK - [agent] Version: 2.0.0b4, OS: linux, execution time 0.7 sec
229 m [SERVER1] [Check_MK] CRIT - [agent] Unsupported protocol version: b/uCRIT, Got no information from host, execution time 0.7 sec

Looks like this werk is similar to your problem https://checkmk.com/werk/11875 and this issue has been fixed in 2.0.0.b5

1 Like

ok, i can confirm that v2.0.0.b5 resolves the problem.
Encryption is now working as expected

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.