Start a Conversation

Solved!

Go to Solution

1 Rookie

 • 

3 Posts

154

March 26th, 2024 01:10

ImportError: cannot import name 'SNIMissingWarning' from 'urllib3.exceptions'

With version 2.0 of urllib3 or greater the script dellemc_device_check.py fails with the following import error:

ImportError: cannot import name 'SNIMissingWarning' from 'urllib3.exceptions' (/usr/local/lib/python3.9/site-packages/urllib3/exceptions.py)

It works with urllib3 less than 2.0 (e.g.: 1.26.18)

This happens because urllib3 removed the SNIMissingWarning exception in 2.0.0 (2023-04-26) when they dropped support for OpenSSL<1.1.1 #2168.

This plug-in needs to be updated following the v2.0 Migration Guide

In the meantime, I'm working on getting this to work by downgrading system installed urllib3, or by using a "venv."

(p.s.: I tried including full output examples, but the forum kept saying "failed to post") 

1 Rookie

 • 

3 Posts

August 23rd, 2024 20:33

Thanks for your responses. I'll try the Redfish plugin since this one is end of life.

In case it helps others, I'll address some other points:

You mentioned that the latest version of this plugin is 3.2. However, the latest version available on the plugin's page is 3.1.

You also mentioned that your team was able to use a 2.x version of urllib3 successfully. This may be because they were using v3.2 of the plugin.

You said the issue is most likely with missing/mismatched python modules in the customer environment, however it isn't. As I noted, the issue is that v 3.0 and 3.1 of the plugin import SNIMissingWarning from urllib3.exceptions. However, that import no longer exists in urllib 3 version >=v2.0.

The proof that this import no longer exists in urllib3 >=v2.0 is in the announcements from the developers of urllib3.

The proof that v3.0 and v3.1 this plugin import it is in their source code. Specifically in the file "Dell_EMC_OpenManage_Plugin_v3.1_Nagios_Core_A00/Dell_OpenManage_Plugin/scripts/restapiendpoint.py" which includes the following:

~/Dell_EMC_OpenManage_Plugin_v3.1_Nagios_Core_A00/Dell_OpenManage_Plugin/scripts$ grep -n SNIMissingWarning restapiendpoint.py

34:from urllib3.exceptions import SNIMissingWarning

100:        requests.packages.urllib3.disable_warnings(SNIMissingWarning)

I did get v3.2 of the plugin working. Downgrade system python wasn't an option, so I used a venv (python virtual environment) as follows:

  1. Install a separate version of python in a venv
  2. install all dependencies in the venv including an old version of urllib3: pip install urllib3==1.26.18
  3. run the plugin script "dellemc_device_check.py" with the venv activated so it uses this version of python and urllib3

(edited)

Moderator

 • 

4.1K Posts

March 26th, 2024 07:10

Hello thanks for choosing Dell and welcome to our community. I am sorry but I am having a hard time what you are trying to do.

 

What is the 3rd party console that you are trying to use the OpenManage plugin on?

Is it for ServiceNow or Nagios?

 

Please share more details.

 

 

Respectfully,

1 Rookie

 • 

3 Posts

March 26th, 2024 21:11

Apologies for not including which plugin I'm using. It's Dell EMC OpenManage Plug-in for Nagios Core. I get the same results from plugin version 3.0 and 3.1.

Moderator

 • 

4.1K Posts

March 27th, 2024 05:14

Hello,

At first glance and based on the observations, my suspicion is that urllib3 2.0 and newer is not supported for our OM Nagios plugin, will need to confirm.

Have you tried to reinstall python?

 

Also do note that the Nagios Core and XI plugins are currently in an EOL and have not been in active development for more than 2 years.

We recommend customers to use the other popular Nagios Redfish plugins for monitoring PowerEdge servers. One of the widely used Nagios plugins for monitoring servers using Redfish based REST APIs is check_redfish (https://dell.to/3J0KLmd). It supports both iDRAC8 and iDRAC9.

 

This is one of the most popular Redfish plugins for Nagios and we are seeing growing adoption for this. It supports multi-vendor platforms and has got a small community around it. 

 

Also customers can also try upgrading to the latest available version of the OM Nagios Core plugin which is v3.2.0

This is the latest and final release of the plugin.

Support for Dell EMC OpenManage Plug-in for Nagios Core - Current Version

 

Respectfully,

Moderator

 • 

4.1K Posts

March 27th, 2024 08:13

Follow up:

The team has tried upgrading urllib3 from version 1.26.18 to 2.2.1 in our lab system, and the Nagios scripts are running fine.

The issue is most likely with one or more missing/mismatched python modules in the customer environment.

This link may be helpful: https://dell.to/3IUNA8s

In any case, the issue is most likely not with the OM plugin for Nagios.

 

Respectfully,

No Events found!

Top