Connection error: ‘ascii’ codec can’t encode characters in position 855-856: ordinal not in range(128)

Hello!
I was monitoring a StoreOnce, it was working correctly but now I get the following error:
Connection error: ‘ascii’ codec can’t encode characters in position 855-856: ordinal not in range(128)OMD[cmk_prueba]:

I have run the following command:

OMD[cmk_prueba]:~$ cmk --debug -vvn ip_storeonce

[cpu_tracking] Start with phase ‘busy’
Check_MK version 1.6.0p9
Try aquire lock on /omd/sites/cmk_prueba/tmp/check_mk/counters/ip_storeonce
Got lock on /omd/sites/cmk_prueba/tmp/check_mk/counters/ip_storeonce
Releasing lock on /omd/sites/cmk_prueba/tmp/check_mk/counters/ip_storeonce
Released lock on /omd/sites/cmk_prueba/tmp/check_mk/counters/ip_storeonce

  • FETCHING DATA
    [cpu_tracking] Push phase ‘ds’ (Stack: [‘busy’])
    [special_storeonce] No persisted sections loaded
    [special_storeonce] Not using cache (Does not exist)
    [special_storeonce] Execute data source
    [special_storeonce] Calling external program '/omd/sites/cmk_prueba/share/check_mk/agents/special/agent_storeonce --address=ip_storeonce --user=check_mk --password=password --no-cert-check ’
    [special_storeonce] ERROR: Agent exited with code 1: Connection error: ‘ascii’ codec can’t encode characters in position 855-856: ordinal not in range(128)
    [cpu_tracking] Pop phase ‘ds’ (Stack: [‘busy’, ‘ds’])
    CRIT - Agent exited with code 1: Connection error: ‘ascii’ codec can’t encode characters in position 855-856: ordinal not in range(128)

How could you solve this problem?

Is it possible that there are some non ASCII characters used for the names of the arrays?
For further debug you need to modify the shipped special agent with a little bit of debug code I think.

You can check this manually if you logged in to the web interface of the storeonce and then open the following URLs

/storeonceservices/cluster/servicesets/
/storeonceservices/cluster/

And for every serviceset you can also check the output with the URL
/storeonceservices/cluster/servicesets/%servicesetid%/services/cat/stores/

I think there are somewhere non ASCII characters included.

1 Like

In file “agent_storeonce”, your should replace the lines:

ET.fromstring(raw_xml))

with

ET.fromstring(raw_xml.encode(‘utf-8’))

Thank you very much!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.