Can't activate changes - ASCII ERROR
Receiving error during Activating Changes. Error "Internal automation error: The text must only contain ASCII characters."
LAST TESTED ON CHECKMK 2.3.0P1
Problem
This issue occurs when a file within the site’s configuration contains non-ASCII characters in either its name or contents. This prevents the central site from successfully synchronizing configuration data to remote sites.
Extracted error message:
Started at: 10:26:42. Finished at: 10:26:54.
Got invalid data:
Internal automation error: The given text must only contain ASCII characters.
Traceback (most recent call last):
File "/omd/sites/mysite/lib/python3/cmk/gui/wato/pages/automation.py", line 170, in _execute_automation_command
html.write(repr(automation.execute(automation.get_request())))
File "/omd/sites/mysite/lib/python3/cmk/gui/watolib/activate_changes.py", line 2270, in get_request
ast.literal_eval(_request.get_ascii_input_mandatory("to_delete")),
File "/omd/sites/mysite/lib/python3/cmk/gui/http.py", line 280, in get_ascii_input_mandatory
return mandatory_parameter(varname, self.get_ascii_input(varname, deflt))
File "/omd/sites/mysite/lib/python3/cmk/gui/http.py", line 276, in get_ascii_input
raise MKUserError(varname, _("The given text must only contain ASCII characters."))
cmk.gui.exceptions.MKUserError: The given text must only contain ASCII characters.
Non ASCII Character List
Solution
We must find the file containing the invalid characters to correct this behavior.
As the site user, within the command line on your central site, go to your site user's home folder.
OMD[mysite]:~$ cd ~/.
Run the following three commands:
OMD[mysite]:~$ find . -type f | xargs ls -ltr |grep --color='auto' -P -n "[^\x00-\x7F]" OMD[mysite]:~$ find . -type f | grep --color='auto' -P -n "[^\x00-\x7F]" OMD[mysite]:~$ grep -aPrl '\x80\x04'.
In this example, the above commands located a file named
bad_filξ_namξ.txtwhich the non-ASCII character is theξ.OMD[mysite]:~/local/share/doc/check_mk$ bad_filξ_namξ.txt.
This file must be deleted, and then changes must be activated again. After all sites have been activated, this issue should be resolved.
Related articles