HPE iLO Restful API Redfish Module Problem

Hello there,

I am actually testing the HPE iLO Restful API Check v4.0 from the Checkmk Exchange.
It works propably but there is a major problem.
Every time i am activating pending changes the module stops working.
([special_ilo] ModuleNotFoundError: No module named ‘redfish.rest.v1’)
I have to reinstall the redfish module to make it work again.
Maybe anyone encountered this problem?

greetings, Dennis

Do you use distributed monitoring? If yes you need to install the Python module on the central instance. If it is not existing on the central instance and mkp sync is activated then you will get the described problem on your worker nodes after every activation.

2 Likes

Yes this is a distributed monitoring. The module is not installed on the central instance as you mentioned. I will test it asap. Thx for the fast help.

Hi,

just another possible reason why redfish install might not work correctly:

In my case, it was a broken urllib module in my cmk 2.1.0p33:


OMD[xxx]:~/local/lib/python3$ python3 -m pip install redfish
Defaulting to user installation because normal site-packages is not writeable
Collecting redfish
  Using cached redfish-3.2.1-py3-none-any.whl (43 kB)
Requirement already satisfied: requests-toolbelt in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from redfish) (0.9.1)
Requirement already satisfied: requests in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from redfish) (2.31.0)
Collecting requests-unixsocket
  Using cached requests_unixsocket-0.3.0-py2.py3-none-any.whl (11 kB)
Collecting jsonpointer
  Using cached jsonpointer-2.4-py2.py3-none-any.whl (7.8 kB)
Collecting jsonpath-rw
  Using cached jsonpath-rw-1.4.0.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
Collecting jsonpatch
  Using cached jsonpatch-1.33-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: ply in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from jsonpath-rw->redfish) (3.11)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Requirement already satisfied: six in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from jsonpath-rw->redfish) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (2022.12.7)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/omd/versions/2.1.0p33.cee/lib/python3.9/site-packages (from requests->redfish) (3.2.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/omd/sites/xxx/local/lib/python3 (from requests->redfish) (2.1.0)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/opt/omd/sites/xxx/local/lib/python3/urllib3-2.1.0.dist-info/METADATA'

How the directory looks like:

OMD[xxx]:~/local/lib/python3/urllib3-2.1.0.dist-info$ ls
licenses/

I fixed it with:

pip3 install --upgrade --force-reinstall urllib3

and

pip3 install --upgrade --force-reinstall redfish

Regards,
Oliver

The python module was installed on the master server, after that everything is working without problems. No more crashing after Activating changes.

Problem solved, thx for the help!