Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Bridge doesn't honor restart_timeout setting

Is this with asynchronous dns? Or regular one? 

On Mon, Nov 5, 2018, 4:04 PM Karl Palsson <karlp@xxxxxxxxxxxx> wrote:

Abilio Marques <abiliojr@xxxxxxxxx> wrote:
> Hello,
>
> I've been playing with the bridge connection, and for some
> reason, if the "remote" broker is not present, restart_timeout
> is only used the first time.
>
> I managed to fix it by doing: context->bridge->restart_t = 0
> Every time: bridge__connect(db, context);
>
> this code is in loop.c
>
> For that particular scenario, it seems to fix it, but I can't
> be 100% sure. I believe there are no tests for it, and the
> "stepped" version of connect (enabled WITH_ADNS) confuses me.
>
> I could submit a patch over github, but I would like to hear
> your opinion on this. Regards, Abilio

Please do, or at least an issue.

This is particularly noticeable with dns failures, where the
bridge connections will become retried continuously, like so:
(continuous reconnection attempts, this is just a segment of the
logs for the :36 second)

Mon Nov 5 15:01:36 2018 daemon.err mosquitto[2300]: Error
creating bridge: Name does not resolve. Mon Nov 5 15:01:36 2018
daemon.notice mosquitto[2300]: Connecting bridge activitystream
(mq.example.org:8883) Mon Nov 5 15:01:36 2018 daemon.err
mosquitto[2300]: Error creating bridge: Name does not resolve.
Mon Nov 5 15:01:36 2018 daemon.notice mosquitto[2300]: Connecting
bridge fake1 (fake1.example.org:1883) Mon Nov 5 15:01:36 2018
daemon.err mosquitto[2300]: Error creating bridge: Name does not
resolve. Mon Nov 5 15:01:36 2018 daemon.notice mosquitto[2300]:
Connecting bridge activitystream (mq.example.org:8883) Mon Nov 5
15:01:36 2018 daemon.err mosquitto[2300]: Error creating bridge:
Name does not resolve. Mon Nov 5 15:01:36 2018 daemon.notice
mosquitto[2300]: Connecting bridge fake1 (fake1.example.org:1883)
Mon Nov 5 15:01:36 2018 daemon.err mosquitto[2300]: Error
creating bridge: Name does not resolve. Mon Nov 5 15:01:36 2018
daemon.notice mosquitto[2300]: Connecting bridge activitystream
(mq.example.org:8883) Mon Nov 5 15:01:36 2018 daemon.err
mosquitto[2300]: Error creating bridge: Name does not resolve.
Mon Nov 5 15:01:36 2018 daemon.notice mosquitto[2300]: Connecting
bridge fake1 (fake1.example.org:1883) Mon Nov 5 15:01:36 2018
daemon.err mosquitto[2300]: Error creating bridge: Name does not
resolve. Mon Nov 5 15:01:36 2018 daemon.notice mosquitto[2300]:
Connecting bridge activitystream (mq.example.org:8883) Mon Nov 5
15:01:36 2018 daemon.err mosquitto[2300]: Error creating bridge:
Name does not resolve. Mon Nov 5 15:01:36 2018 daemon.notice
mosquitto[2300]: Connecting bridge fake1 (fake1.example.org:1883)
Mon Nov 5 15:01:36 2018 daemon.err mosquitto[2300]: Error
creating bridge: Name does not resolve. Mon Nov 5 15:01:36 2018
daemon.notice mosquitto[2300]: Connecting bridge activitystream
(mq.example.org:8883) Mon Nov 5 15:01:36 2018 daemon.err
mosquitto[2300]: Error creating bridge: Name does not resolve.

Cheers,
Karl P_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top