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

MQTT not working starting in 2024.5.4 #117714

Open
ve6rah opened this issue May 18, 2024 · 5 comments
Open

MQTT not working starting in 2024.5.4 #117714

ve6rah opened this issue May 18, 2024 · 5 comments

Comments

@ve6rah
Copy link

ve6rah commented May 18, 2024

The problem

Starting upon upgrade from 2024.5.3 to 2024.5.4 MQTT stops working, clients connect, but no data is transmitted. Supervisor log shows MQTT errors.

What version of Home Assistant Core has the issue?

core-2024.5.4

What was the last working version of Home Assistant Core?

core-2024.5.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MQTT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mqtt/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

no ack from mqtt server in 10 seconds

Additional information

The MQTT error in the log just repeats over and over again. No errors visible in the MQTT add-on.

Multiple reboots, and restarts of HA, and of the MQTT add-on fail to resolve the issue.
Downgrading to 2024.5.3 immediately solves the problem.

@home-assistant
Copy link

Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mqtt can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mqtt Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mqtt documentation
mqtt source
(message by IssueLinks)

@anthonym21
Copy link

Looks like whatever ws library provides websocketwrapper in dev is not what we have in the main branch, this is in core btw (docker)

I'm sure it's obvious, but this is due to the cherry picked change in mqtt-client this release.

Logger: homeassistant
Source: components/mqtt/client.py:550
First occurred: 04:10:54 (39 occurrences)
Last logged: 04:49:45

Error doing job: Exception in callback MQTT._async_on_socket_open(<paho.mqtt.cl...x152d396e8a70>, None, <paho.mqtt.cl...x152d19f4b050>)
Error doing job: Exception in callback MQTT._async_on_socket_open(<paho.mqtt.cl...x152d396e8a70>, None, <paho.mqtt.cl...x152d19ef39b0>)
Error doing job: Exception in callback MQTT._async_on_socket_open(<paho.mqtt.cl...x152d396e8a70>, None, <paho.mqtt.cl...x152d22369bb0>)
Error doing job: Exception in callback MQTT._async_on_socket_open(<paho.mqtt.cl...x152d396e8a70>, None, <paho.mqtt.cl...x152d19e2f5f0>)
Error doing job: Exception in callback MQTT._async_on_socket_open(<paho.mqtt.cl...x152d396e8a70>, None, <paho.mqtt.cl...x152d19f02720>)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 582, in _async_on_socket_open
self._increase_socket_buffer_size(sock)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 550, in _increase_socket_buffer_size
sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, new_buffer_size)
^^^^^^^^^^^^^^^
AttributeError: 'WebsocketWrapper' object has no attribute 'setsockopt'

@bdraco
Copy link
Member

bdraco commented May 19, 2024

#117672

@bdraco
Copy link
Member

bdraco commented May 19, 2024

#115958 (comment)

@SB0519
Copy link

SB0519 commented May 20, 2024

This is on a esxi server not docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants