Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] strange disconnect being received

Hi Pierre,

>From mosquitto.h you can see that the return code 7 is
MOSQ_ERR_CONN_LOST, which means the client thinks the broker dropped
the connection. Are you sure the staging and production servers are
the same?



On Wed, Feb 4, 2015 at 6:05 AM,  <pierre@xxxxxxxxxxxxxxxxx> wrote:
> Hi,
> I'm running into a problem using libmosquitto (with c++ wrapper) and an
> MQTT broker (I believe it's RabbitMQ)
> Well, everything worked fine on our staging server, and now I've moved to
> a production server and I'm getting weird disconnects from the broker.
> Basically I successfully connect, but then immediately afterwards I get my
> mosquitto disconnect callback triggered, with a return code of 7.
> Now from the docs, the rc integer value indicates the reason for the
> disconnect.
> "A value of 0 means the client has called mosquitto_disconnect.  Any other
> value indicates that the disconnect is unexpected."
> What could cause a disconnect with a code of 7? My software works
> perfectly fine with our staging MQTT broker, just not on the production
> server.
> Using the command-line mosquitto_sub tool, I can connect to the broker
> without any problems (on this production server).
> I'm really stumped....any help would be greatly appreciated!
> I'm using this wrapper to connect by the way if that's useful:
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top