Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP iLo inegration fails to update #111668

Closed
SMaiz opened this issue Feb 27, 2024 · 3 comments
Closed

HP iLo inegration fails to update #111668

SMaiz opened this issue Feb 27, 2024 · 3 comments

Comments

@SMaiz
Copy link

SMaiz commented Feb 27, 2024

The problem

The hp_ilo fails to update since (I think) a least 2024.2.3, but might be before.
In the logs I have AttributeError: module 'ssl' has no attribute 'wrap_socket' (full stacktrace in the log below).
It seems that Python 3.12 removed this method (see here)

What version of Home Assistant Core has the issue?

core-2024.2.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

hp_ilo

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

hp_ilo: Error on device update!

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1261, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hp_ilo/sensor.py", line 166, in update
    ilo_data = getattr(self.hp_ilo_data.data, self._ilo_function)()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 1205, in get_host_power_status
    return self._info_tag('SERVER_INFO', 'GET_HOST_POWER_STATUS', 'GET_HOST_POWER',
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 730, in _info_tag
    header, message = self._request(root)
                      ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 238, in _request
    self._detect_protocol()
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 278, in _detect_protocol
    header, data = self._communicate(b'<RIBCL VERSION="2.0"></RIBCL>', ILO_HTTP, save=False)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 406, in _communicate
    sock = self._get_socket()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 401, in _get_socket
    return ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS)
           ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

Additional information

No response

@home-assistant
Copy link

@pinkywafer
Copy link
Contributor

I believe this is a duplicate of #109581
I've had the same issue, and it looks like its already been fixed by #110325

Sadly will not be released until 2024.3, but not long to wait now! There's a temporary solution in the original issue listed above!

@SMaiz
Copy link
Author

SMaiz commented Feb 28, 2024

That's indeed the same issue, I think I only searched for opened issues while trying to see if this wasn't already reported. Sorry for the noise

@SMaiz SMaiz closed this as completed Feb 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants