← Back to team overview

mosquitto-users team mailing list archive

Re: Assert within bridged mosquitto (called MClient) -> Mosquitto (called MServer) fails when the server brought down and up again

 

Thanks for the fast response Karl. I changed the bridge type to automatic,
and that works great.
I'd better file a bug report then.
Btw PERPETUAL stands for Personalized Products Emerging from Tailored User
Adapting Logic, and is the name of a project we're working on. So, we're
building smarter machines... I guess that translates to lazy for me ;)

And thanks again fellow Fluksonian !



On Wed, May 15, 2013 at 7:04 PM, Karl Palsson <karlp@xxxxxxxxxxxx> wrote:

>
> Cool!
>
> Fwiw, I don't see this, and we use that setup quite extensively, and have
> done so with
> various versions of mosquitto back to about 0.15.  However, we don't use
> lazy for the
> bridge, we use automatic.  (Strange name for the bridge: perpetual, when
> you're using
> lazy ;)
>
> We're also using the same hardware, so it's not flukso/mips specific.
>
> Cheers,
> Karl P
>
> On Wed, May 15, 2013 at 06:40:16PM +0200, Paul-Armand Verhaegen wrote:
> > I have a Mosquitto instance (calling this MClient) bridged to another
> > Mosquitto instance (calling this one MServer).
> >
> > Everything is working fine if MServer is started before MClient, but if
> > MClient is already running before the MServer, the result is a failing
> > MClient instance. The failed connects are expected, but the failing
> > assertion is not. Here's MClient's output:
> >
> > root@flukso-d7dc7f:~# /etc/init.d/mosquitto start
> > 1367585155: mosquitto version 1.1.3 (build date 2013-03-17
> > 15:26:24+0100) starting
> > 1367585155: Config loaded from /etc/mosquitto/mosquitto.conf.
> > 1367585155: Opening ipv6 listen socket on port 1883.
> > 1367585155: Warning: Address family not supported by protocol
> > 1367585155: Opening ipv4 listen socket on port 1883.
> > 1367585155: Connecting bridge perpetual
> > root@flukso-d7dc7f:~# 1367585155: Error creating bridge.
> > 1367585155: Warning: Unable to connect to bridge perpetual.
> > 1367585155: New connection from 127.0.0.1.
> > 1367585155: New client connected from 127.0.0.1 as fluksod.
> > 1367585156: Connecting bridge perpetual
> > 1367585156: Error creating bridge.
> > 1367585157: Connecting bridge perpetual
> > 1367585157: Error creating bridge.
> > 1367585158: Connecting bridge perpetual
> > /usr/sbin/mosquitto: loop.c: 291: loop_handle_reads_writes: Assertion
> > `pollfds[db->contexts[i]->pollfd_index].fd == db->contexts[i]->sock'
> > failed.
> >
> > Note: The connection from 127.0.0.1 is something different/unrelated, as
> > MClient is certainly running on a different machine than the MServer.
> Some
> > details from Mosquitto.conf (no encryption set):
> >
> > connection my_named_connection
> > topic # out
> > start_type lazy
> > #idle_timeout 60
> > threshold 2
> > username test_username
> > password test_password
> >
> > Note: I believe the problem to be related to MClient as substituting the
> > Mosquitto instance at MServer with a MQTT.js instance gives the same
> result
> > (see also https://github.com/adamvr/MQTT.js/issues/74) . MServer however
> > also picks up on the problem when MClient connects:
> >
> > pave@CIB-flukso:~/perpetual/mosquitto_tests/mosquitto-1.1.3/src$
> ./mosquitto
> > 1368635611: mosquitto version 1.1.3 (build date 2013-05-08
> > 11:47:28+0200) starting
> > 1368635611: Using default config.
> > 1368635611: Opening ipv4 listen socket on port 1883.
> > 1368635611: Opening ipv6 listen socket on port 1883.
> > 1368635612: New connection from 10.33.172.87.
> > 1368635612: New client connected from 10.33.172.87 as
> flukso-d7dc7f.perpetual.
> > 1368635612: Socket read error on client flukso-d7dc7f.perpetual,
> disconnecting.
> >
> > MServer however keeps running, and after restarting the MClient both live
> > happily together (that is of course if MServer isn't brought down and
> up).
> > Ps: The MClient is running on a Flukso device (see flukso.net) and
> bridged
> > to MServer running on Ubuntu 12.04 (Precise Pangolin).
>
> > --
> > Mailing list: https://launchpad.net/~mosquitto-users
> > Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~mosquitto-users
> > More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References