mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

2.0.15 regression: bridge is not created, with "Expiring client local.xxx due to timeout"

Open svet-b opened this issue 3 years ago • 2 comments

After upgrading to 2.0.15, we observed that in about 50% of cases broker bridges are not created on start-up. The log shows the message

Expiring client local.<bridge-name> due to timeout.

immediately on start-up (i.e. not after an actual conceivable timeout).

This was first reported in https://github.com/eclipse/mosquitto/issues/1334#issuecomment-1219606937 and subsequent comments in that thread (thanks @everactivetim, @vomov), though it's almost certainly a separate issue from #1334. It appears to have been an unintentional side effect of https://github.com/eclipse/mosquitto/commit/c99502a2567bf9147b3d811cb17e38ad51f08660. Indeed, the issue does not seem to occur in 2.0.14.

In our specific case this is on Linux on ARM.

svet-b avatar Sep 14 '22 19:09 svet-b

We also reverted to 2.0.14 to solve our problem.

everactivetim avatar Sep 14 '22 19:09 everactivetim

Same - had this issue and glad I saw this as I was pulling my hair out. On 2.0.15, I was only getting these logs:

2022-09-14T21:17:29: Connecting bridge lollipop_mqtt (192.168.1.208:1883)
2022-09-14T21:17:29: Warning: Unable to connect to bridge lollipop_mqtt.
2022-09-14T21:17:29: mosquitto version 2.0.15 running
2022-09-14T21:17:29: Expiring client local.3410804944a7.lollipop_mqtt due to timeout.

gerardsyd avatar Sep 15 '22 00:09 gerardsyd

Having the same problem on Windows machine:

1664897688: mosquitto version 2.0.15 starting
1664897688: Config loaded from C:\Program Files\mosquitto/mosquitto.conf.
1664897688: Opening ipv4 listen socket on port 1883.
1664897688: Bridge local.PRODUCTION-MOSQ.main doing local SUBSCRIBE on topic ets/sensors/#
1664897688: Bridge local.PRODUCTION-MOSQ.main doing local SUBSCRIBE on topic test/#
1664897688: Connecting bridge main (mqtt:8883)
1664897688: Bridge PRODUCTION-MOSQ.main sending CONNECT
1664897688: mosquitto version 2.0.15 running
1664897688: Expiring client local.PRODUCTION-MOSQ.main due to timeout.

haizz avatar Oct 04 '22 15:10 haizz

Same issue

1666866838: Config loaded from /mosquitto/config/mosquitto.conf.
1666866838: Opening ipv4 listen socket on port 1886.
1666866838: Opening ipv6 listen socket on port 1886.
1666866838: Connecting bridge mosquitto-device-5 (xxx)
1666866838: mosquitto version 2.0.15 running
1666866839: Expiring client local.mosquitto-device-5 due to timeout.
1666866839: New connection from ::1:51704 on port 1886.
1666866839: New connection from ::1:51706 on port 1886.
1666866839: New client connected from ::1:51704 as sparkplug-maestro (p2, c1, k3000).
1666866839: New client connected from ::1:51706 as old-maestro (p2, c1, k60).
1666866841: New connection from 127.0.0.1:40616 on port 1886.
1666866841: New client connected from 127.0.0.1:40616 as processor (p2, c1, k20).```

jld-adriano avatar Oct 27 '22 10:10 jld-adriano

I'm pretty sure I was seeing this as well today. That "expiring client local.blah due to timeout", and with zero extra info available. In my case I was only bridging to a same network, 192.168.blah, no encryption, and restarting fixed things, couldn't figure it out. I'll hopefully be able to collect more information though.

karlp avatar Oct 27 '22 23:10 karlp

In my case it happens every 2nd reboot, on the clock. Reboot -> expires, reboot -> works , reboot -> expires, etc...

jld-adriano avatar Oct 28 '22 00:10 jld-adriano

How is this still not fixed?

markdegrootnl avatar Nov 30 '22 15:11 markdegrootnl

Can confirm with docker v2.0.15 on Debian 11 armv7l, revert to 2.0.14 fixes the problem

Nightenom avatar Dec 03 '22 10:12 Nightenom

Can report the same thing with: macOS Ventura 13 M1 docker 20.10.18 v2.0.15

It was intermittent in my case. Not consistent when I could/couldn't not have the bridge running.

serroba avatar Dec 12 '22 01:12 serroba

We upgraded to 2.0.15 due to https://github.com/eclipse/mosquitto/issues/2594 but now we have to downgrade due to this bug.

This bug is severe, please look into this.

pod67 avatar Dec 21 '22 06:12 pod67

Same issue with 2.0.15. It appears the issue has been known for some time; why in Jan 2023 it's still not fixed?

Jan 15 13:12:51 micro mosquitto.mosquitto[1597]: 1673817171: Connecting bridge (step 2) 2cloudww (cloud.x.com:8883) Jan 15 13:12:51 micro mosquitto.mosquitto[1597]: 1673817171: Expiring client local.micro.2cloudww due to timeout.

lepgithub avatar Jan 15 '23 22:01 lepgithub

Same issue with 2.0.15. It appears the issue has been known for some time; why in Jan 2023 it's still not fixed?

Jan 15 13:12:51 micro mosquitto.mosquitto[1597]: 1673817171: Connecting bridge (step 2) 2cloudww (cloud.x.com:8883) Jan 15 13:12:51 micro mosquitto.mosquitto[1597]: 1673817171: Expiring client local.micro.2cloudww due to timeout.

@ralight ??

pod67 avatar Jan 26 '23 09:01 pod67

Hey. I do face similar issue on Hassio. With Mosquitto broker Add-On version: 6.2.0

krzakx avatar Apr 14 '23 08:04 krzakx

Same issue here right now trying to connect to HiveMQ, and it doesn't reconnect anymore as it says in the docs. I made a separate issue for this here: #2795

EpicLPer avatar Apr 27 '23 17:04 EpicLPer

Same issue here: mosquitto bridge 2.0.15 to mosquitto. I had to downgrade to 2.0.14 and now is working good

ghost avatar May 11 '23 16:05 ghost

same problem here, how to downgrade to 2.0.14 on Linux, I did not find a package

dj0abr avatar Jun 12 '23 00:06 dj0abr

reboot does not solve this problem

dj0abr avatar Jun 26 '23 19:06 dj0abr

https://github.com/home-assistant/addons/issues/3072

I create above issue, today found that root of cause is timeout to bridge broker. I'm wiaitng for fix but to workaround how to increase timeout for bridge and what value is default?

kzajac83 avatar Jun 30 '23 06:06 kzajac83

Same problem here. I'm using version 2.0.15, and the issue occurs every second start of mosquitto.

I'm using the following settings on bridge:

connection test
cleansession false
try_private false
bridge_attempt_unsubscribe false
notifications true
max_inflight_messages 5
persistence true
persistence_location /var/lib/mosquitto
autosave_interval 60
persistent_client_expiration 30d
bridge_capath /etc/ssl/certs

kelvincesar avatar Jun 30 '23 12:06 kelvincesar

@ralight can you provide any insight/update on this issue?

Makin-Things avatar Jun 30 '23 13:06 Makin-Things

still there...

persistence false "fixes" but create another issues

nikito7 avatar Jul 21 '23 06:07 nikito7

I have submitted a PR.

Please note that I had zero experience with mosquitto code prior to this so if you decide to use the fix before it is reviewed by maintainers, you risk running into potential side effects I have not foreseen.

swiergot avatar Jul 22 '23 15:07 swiergot

Nevermind, apparently the fix (https://github.com/eclipse/mosquitto/commit/6d240a9d183413fca7d2a4f42eae803ba84af97c) has been on the fixes branch for over 3 months. There just hasn't been any new release since.

swiergot avatar Jul 22 '23 15:07 swiergot

In my case it happens every 2nd reboot, on the clock. Reboot -> expires, reboot -> works , reboot -> expires, etc...

I confirm this.

But no need reboot.

Just stop and start mosquitto

nikito7 avatar Jul 22 '23 15:07 nikito7

Wondering if there is any progress on this since requires me a manual restart every day?

tschweitzer avatar Jul 30 '23 17:07 tschweitzer

Yes, it's fixed but not released. You can:

  • Revert to .14
  • Restart it manually
  • Wait for a new release

chennin avatar Jul 30 '23 17:07 chennin

When is planned new release?

kzajac83 avatar Jul 30 '23 21:07 kzajac83

Awesome! Thanks @ralight, almost thought Mosquitto was dead :)

EpicLPer avatar Aug 16 '23 13:08 EpicLPer

I guess it's on an annual release schedule now :)

2.0.16 - 2023-08-16 2.0.15 - 2022-08-16

svet-b avatar Aug 16 '23 13:08 svet-b