Hello,
I am trying to use the robotmk plugin. I always get this message when I run it. Does anyone know the problem?
Karsten
CMK version: 2.0 OS version:
Ubuntu 22.04 Error message:
WARNING: Exception in discovery function of check plugin ‘robotmk’: Can not load Robotmk JSON data! (json.loads()) Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
Can you execute the Robot test itself? => robot foo.robot
Is the CMK agent able to start robotmk-runner.py?
Python modules must be installed within an admin cmd (pip3 install robotframework pyyaml mergedeep python-dateutil)
Check the cmk agent log: which interpreter does the cmk agent use to start robotmk-runner? If you see the interpreter of the agent (venv…), this is wrong. In this case, configure the Python interpreter like this:
Does your Robot test produce any console output? The runner execution (see above) should not produce any stdout.
thanks, for the answer.
** Can you execute the Robot test itself? => robot foo.robot* Yes I can. Python modules must be installed within an admin cmd (pip3 install robotframework pyyaml mergedeep python-dateutil) All modules are installed Here are Logfiles:
Exec app ‘python.exe “C:\ProgramData\checkmk\agent\plugins\robotmk-runner.py”’, mode [0]
In [368] milliseconds process ‘python.exe “C:\ProgramData\checkmk\agent\plugins\robotmk-runner.py”’ pid:[7448] SUCCEDED - generated [0] bytes of data in [0] blocks
When I try to do it this way, I get the following error messages:
C:\ProgramData\checkmk\agent\plugins>python robotmk-runner.py
Traceback (most recent call last):
File “C:\ProgramData\checkmk\agent\plugins\robotmk-runner.py”, line 23, in
from robotmk import *
File “C:\ProgramData\checkmk\agent\plugins\robotmk.py”, line 1522, in
from dateutil import parser
File “C:\Program Files\Python310\lib\site-packages\dateutil\parser_init_.py”, line 2, in
from ._parser import parse, parser, parserinfo, ParserError
File “C:\Program Files\Python310\lib\site-packages\dateutil\parser_parser.py”, line 42, in
import six
ModuleNotFoundError: No module named ‘six’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\ProgramData\checkmk\agent\plugins\robotmk-runner.py”, line 30, in
from robotmk import *
File “C:\ProgramData\checkmk\agent\plugins\robotmk.py”, line 1522, in
from dateutil import parser
File “C:\Program Files\Python310\lib\site-packages\dateutil\parser_init_.py”, line 2, in
from ._parser import parse, parser, parserinfo, ParserError
File “C:\Program Files\Python310\lib\site-packages\dateutil\parser_parser.py”, line 42, in
import six
ModuleNotFoundError: No module named ‘six’
Can you please try the following: as an Admin (EDIT: where you can start robotmk), start a Python shell:
❯ python
Python 3.8.9 (default, Oct 26 2021, 07:25:53)
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import six
>>> import inspect
>>> inspect.getfile(six)
'/.............../lib/python3.8/site-packages/six.py' # WHAT IS THE LOCATION OF six ON YOUR MACHINE?
>>>
I know that when modules were installed as normal user, another following installation attempt in an Admin cmd will report that the module is “already installed”.
You are able to use the module from this admin cmd (because it can also load the module from your user profile), but NT AUTHORITY SYSTEM (where the agent runs under) does not have access to that profile.
The path ist:
C:\Users\constantin\AppData\Roaming\Python\Python310\site-packages\six.py’
And this is exactly the problem. Probably you have installed the modules first as “constantin” and then (after you saw that Robotmk cannot be started) as Admin - but from this shell the module seemed to be installed already.
=> Try to rename/delete the Python folder in your profile and install the modules again from the admin cmd.
If you execute the Python commands again, six should be shown unter Program files/Python/....
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.