Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Spotty connection to remote bridge causes local broker to fail

This is down to the broker doing DNS lookups for the remote end of the
bridge while the connection is down.

There is an open issue to track this.

https://github.com/eclipse/mosquitto/issues/41

If you can use an IP address for the remote end of the broker that will
work round the problem for now.


On 12/12/16 23:28, Brent Sink wrote:
> I have configured the mosquitto broker on the local machine to bridge
> some topics to a remote broker.  The connection to the remote broker is
> over UMTS (interface ppp0), so connection is not always that great and
> often comes and goes.  I've noticed that when the connection to the
> remote broker is lost, it also causes some problems with the local
> broker as well.  For example, I have a C++ application publishing data
> to the local broker (localhost) and when the UMTS connection gets
> dropped, my app gets a disconnection from remote broker first, then
> several seconds later the connection to localhost is lost.  
> 
> 
> When this happens, if I open up a terminal and type in "mosquitto_sub -t
> '$SYS/broker/#' -v", nothing happens - there is no connection refused
> message, it just sits there like it's waiting on something to happen.
> 
> 
> I've set up the metrics in each interface so that the wifi1 interface is
> metric 0, and ppp0 is metric 20, thinking that perhaps UMTS is taking
> precedence over wifi but it did not change anything.
> 
> 
> If I disable the bridge in the .config file, this problem does not occur.
> 
> 
> Here is my mosquitto.conf file:
> 
> 
> root@ubuntu:~# cat /etc/mosquitto/mosquitto.conf
> pid_file /var/run/mosquitto.pid
> 
> persistence false
> persistence_location /var/lib/mosquitto/
> 
> log_dest file /var/log/mosquitto/mosquitto.log
> log_facility 5
> 
> include_dir /etc/mosquitto/conf.d
> 
> listener 1883
> 
> connection br-to-cloud-12345
> address <removed>.com:1883
> remote_username blah
> remote_password blah
> topic out/topic out 2 "" ""
> topic in/topic/# in "" ""
> 
> 
> 
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
> 

-- 
http://www.hardill.me.uk/wordpress
http://about.me/hardillb
http://flickr.com/photos/hardillb/
http://last.fm/user/hardillb
https://keybase.io/hardillb


Back to the top