Open audricschiltknecht opened 7 months ago
I have a vague memory of a similar scenario a long time ago. https://github.com/eclipse/mosquitto/issues/2634
Relevant? Looks like there should be a fix in 2.0.16 2.0.17 and in 2.0.18 https://github.com/eclipse/mosquitto/commit/6d240a9d183413fca7d2a4f42eae803ba84af97c
Yes, this looks like there are some similarities. #2634 affected us as well and was one of the reasons we were stuck on 2.0.14, and were waiting for a > 2.0.15 version to be available on our system.
However, I think #2434 was more systematic, while this issue really only occurs the first connection after an upgrade.
We struggled with a migration from 2.0.14 to 2.0.18 (version bump provided by our OS), where we would see mosquitto not connecting to the remote side of a bridge after the update. Restarting mosquitto would resolve the issue.
We managed to pinpoint it to a change between 2.0.15 and 2.0.16: if you have a bridge configured, persistence enabled and no clean session, then the first connection attempt after the upgrade will fail.
I've managed to produce the following repeatable scenario:
Using this configuration file:
start out with a 2.0.15 or below build:
Here everything works file, and the broker publishes its state to the remote bridge. We also have a local client (client id
local_client
in the log) that publishes a message that is received by a client subscribed to the bridge.Then switch to a mosquitto build using any version >= 2.0.16:
Here mosquitto won't connect to the remote bridge and any message sent by the local client is not forwarded to the bridge side.
Restarting mosquitto makes everything go back to normal:
The only differences between the 2 logs are the line
Expiring client local.RemoteClientId due to timeout.
when starting first after the update and the missing publication to the bridge.I understand that this might not be considered as a bug but thought it would be helpful to some other users that are in the same scenario.