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
mosquitto broker add on require manual restart after update or full system reboot to work properly with bridge connection #3012
Comments
You are probably aware, but just to be sure: You can disable auto-update to prevent running into the issue at random.
...
That is weird. There is no real difference between a manual add-on restart and a restart after update. |
Could it be related to order of operation? Maybe when the OS boot up something is not yet ready and the mosquitto add on don't initialize properly? This morning I've updated the OS to the latest available (10.1) and sure, it happened again, mqtt device that are controlled by the secondary server didn't receive any command, nor HA could listen to their message. Restart the mosquitto add on and all is fine. The HA OS runs on a qemu vm on a Linux machine Should I look into set up an automation that will restart the add on, say, a minute after a finished boot? |
I am experiencing the same issue. I have a bridge configured and after a HA restart it doesn't work until I manually restart mosquitto. |
Exactly the same pattern here: A Mosquitto add-on Reboot initiated by an update or running the add-on reboot service results in my bridge connection being lost. The log file shows that the bridge connection is retrieved from the configuration file, but the bridge device no longer pushes messages - used a matt sniffer to confirm. A simple restart on the add-on page however solves the problem. No difference in log file outputs. |
I'm on |
This is not fixed. I am on 2023.5.4 and installed the OS update this morning and after that no updates from the configured bridge until I restarted the Mosquitto Broker addin. |
Yep, you're right, I did the same update this morning and the mosquito bridge needed a manual restart |
have the same issue here |
This probably a problem with mosquitto 2.0.15. |
I created #3072 and toady found that issue is due to timeout, reading eclipse/mosquitto#2634 is the same. |
@agners I am not sure if you are the right person to tag, but Mosquitto needs to be reverted to 2.0.14 until that project fixes this issue. |
Have the same, sometimes it doesn't load the conf file. |
I am experiencing the same issue. Since I over night power down my nas where HA runs on, this is an issue for me every morning. |
Same issue here with Mosquitto Broker 6.2.1 and Home Assistant 2023.7.3. |
I have developed a workaround until this issue get fixed: simply create an automation that will restart the add on when it detect that the mqtt bridge is not working. For the detection of the unavailability of the mqtt bridge, I set up a binary sensor that simply check if has received any update from a mqtt device that usually publish its status multiple times a minute. Here the automation config (delays are optional): alias: Restart Mosquitto Broker
description: ""
trigger:
- platform: homeassistant
event: start
enabled: false
- platform: state
entity_id:
- binary_sensor.mqtt_bridge_is_online
to: "off"
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: hassio.addon_restart
data:
addon: core_mosquitto
mode: single the binary sensor is a template based on the value of the mqtt entity that publish often: in my case it is a thermostat, that when HA restart has a template:
- binary_sensor:
- name: "mqtt bridge is online"
state: "{{state_attr('climate.termostato_giorno', 'current_temperature') }}"
delay_off: 00:01:00 |
Rolled back my mosquitto addon to version 6.1.3 and it's working for weeks now without any problems... |
With #3187 Mosquitto is now updated to 2.0.17. Since @gjdoornink linked this to an issue in Mosquitto 2.0.15, which is resolved now, I'd expect this to be solved with the Add-on update 6.3.0. Can someone affected by this test and report? Thanks! |
Sure thing, just tested and it didn't work for me, I had to do a second restart , unfortunately. |
I had to restart after the update as well to make it work. |
It will not work right after the upgrade because the new version starts with an incorrect persistence file left by the old version, however after each consecutive restart it will be ok. |
Today in my HA appear Mosquito broker update notofication to 6.3.0. I will update, made test and let you know later. PS. Twice restart HA and for both causes working fine. |
I tested version 6.3.1 and it's also not working... Needed to restart the addon after HA restart to get the bridge working again. |
It is fixed for me just as I described in my previous comment. Maybe it's a slightly different scenario. What's your bridge configuration? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the issue you are experiencing
Hello,
tonight the mosquitto broker auto updated and this morning few devices that relies on it weren't functioning because the signal was not getting trough. This alread happened in the last couple of month or so and I knew that the add on required a manual restart in order to work properly again.
The issue seems to be with the bridge configuration: I have two server on two different machines, where the main server is hosted by HA itself which is bridged to the secondary that actually handles the devices to run. The configuration for such bridge has worked fine for a long time (in share/mosquitto/mosquito.conf):
connection ave-bridge address 192.168.1.10:1883 topic /f8:xx:xx:xx/# out 0 topic /f8:xx:xx:xx/# in 0
When an add on update or full reboot happens the two server don't communicate anymore. I can see that mqtt message are sent on the HA side (listening to all topic in the mqtt device configuration page), but none are received at the secondary server, nor message generated from the secondary are received to the HA side.
A simple restart of the mosquitto broker solve the issue.
I'm able to reproduce the issue by doing a full reboot of HA.
Full reboot and auto update are rare events so I'm not sure when this issue has started, but it happend quite recently, at least a couple of month or so.
(not sure it there is anything useful in the supervisor log I've attached, I've seen no mention of mqtt or mosquitto broker)
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Which add-on are you reporting an issue with?
Mosquitto
What is the version of the add-on?
6.2.1
Steps to reproduce the issue
...
System Health information
System Information
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
Spotify
Anything in the Supervisor logs that might be useful for us?
Anything in the add-on logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: