Dell OpenManage - OMSDK error while using the plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gcicala
Posts: 3
Joined: Tue Nov 12, 2019 8:46 am

Dell OpenManage - OMSDK error while using the plugin

Post by gcicala »

Good afternoon to everybody.
I've updated a Nagios system both for OS and for the application.
Now I'm running the 5.7.1 Nagios Xi release.
I've also updated the Dell OpenManage to the 3.1 release but while I try to launch this check I'll encounter this type of error:

# python /usr/local/nagios/libexec/dellemc_device_check.py
Traceback (most recent call last):
File "/usr/local/nagios/libexec/dellemc_device_check.py", line 23, in <module>
from omsdk.sdkproto import SNMPOptions
File "/usr/lib/python2.7/site-packages/omsdk/sdkproto.py", line 41, in <module>
from omsdk.http.sdkrestbase import RestOptions
File "/usr/lib/python2.7/site-packages/omsdk/http/sdkrestbase.py", line 27, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
from urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.7/site-packages/urllib3/__init__.py", line 10, in <module>
from .connectionpool import (
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 31, in <module>
from .connection import (
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 45, in <module>
from .util.ssl_ import (
File "/usr/lib/python2.7/site-packages/urllib3/util/__init__.py", line 4, in <module>
from .request import make_headers
File "/usr/lib/python2.7/site-packages/urllib3/util/request.py", line 5, in <module>
from ..exceptions import UnrewindableBodyError
ImportError: cannot import name UnrewindableBodyError
#


The omsdk package is the last one:
# pip search omsdk
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developme ... -2-support
omsdk (1.2.445) - Dell OpenManage SDK
INSTALLED: 1.2.445 (latest)
#


Some of you have had the same problem?
Any advice?

OS: Red Hat Enterprise Linux Server release 7.8 (Maipo)
Nagios Core 4.4.6

Best regards.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Dell OpenManage - OMSDK error while using the plugin

Post by ssax »

Try doing this:

Code: Select all

yum reinstall python-urllib3 python-enum34 python-chardet python-requests
Then test, if it still doesn't work, try doing this:

Code: Select all

cp -rfp /usr/lib/python2.7/site-packages/urllib3 /usr/lib/python2.7/site-packages/urllib3.bak
mv /usr/lib/python2.7/site-packages/urllib3 /tmp/
yum reinstall python-urllib3
Then test again.
gcicala
Posts: 3
Joined: Tue Nov 12, 2019 8:46 am

Re: Dell OpenManage - OMSDK error while using the plugin

Post by gcicala »

Hi ssax.

I've tried your hints and now the error message is different:

Code: Select all

# python /usr/local/nagios/libexec/dellemc_device_check.py
Traceback (most recent call last):
  File "/usr/local/nagios/libexec/dellemc_device_check.py", line 23, in <module>
    from omsdk.sdkproto import SNMPOptions
  File "/usr/lib/python2.7/site-packages/omsdk/sdkproto.py", line 41, in <module>
    from omsdk.http.sdkrestbase import RestOptions
  File "/usr/lib/python2.7/site-packages/omsdk/http/sdkrestbase.py", line 32, in <module>
    from omsdk.http.sdkhttpep import AuthenticationType
  File "/usr/lib/python2.7/site-packages/omsdk/http/sdkhttpep.py", line 37, in <module>
    from requests.packages.urllib3.exceptions import SNIMissingWarning
ImportError: cannot import name SNIMissingWarning
#
Thank you.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Dell OpenManage - OMSDK error while using the plugin

Post by ssax »

Try doing this:

Code: Select all

pip install requests
Locked