0

MQTT bridge quit working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MQTT bridge quit working

by bigt on Wed Oct 25, 2017 8:19 pm

I've had a working MQTT bridge from the mosquitto server on my raspberrypi to adafruit.io since July. Yesterday it stopped working, and mosquitto tried almost continuously to reconnect. The last good data was at 2017-10-24 8:25:03 am (PDT). Nothing changed on my end at that time. The same configuration has been working for at least 3 months.

My mosquitto.log file has a bunch of these:
1508976249: Connecting bridge bigtbroker (io.adafruit.com:1883)
1508976250: Socket error on client local.piserver.bigtbroker, disconnecting.

and I get a bunch of connection messages on my connections monitor page, that quickly change to disconnected.

Until throttling kicks in, then I understandably get these:
1508976255: Connection Refused: unknown reason

If I change start_type to once in my bridge.conf file, it doesn't spin, but it also doesn't connect. Nothing shows up on the monitor.

Any ideas?

bigt
 
Posts: 7
Joined: Sun Feb 26, 2012 2:50 am

Re: MQTT bridge quit working

by bigt on Sat Dec 09, 2017 7:32 pm

So to reiterate: my bridge connection was working just fine until 10/24, then it quit without me changing anything on my end. That happened to be the date that Adafruit added the feature to track client connections.

Currently, with start_type set to automatic, the broker attempts to connect to io.adafruit.com every 62 seconds, but never establishes a connection, and never posts data. The monitor only shows:
2017-12-09 15:17:11 piserver.bigtbroker disconnected

Here is my mosquitto.conf:
# Bridge to Adafruit.IO
connection bigtbroker
address io.adafruit.com

# Config options
cleansession false
notifications false
try_private false
start_type once
# bridge_protocol_version mqttv311

# Credentials
remote_username bigt
remote_password 8675309

# topics
topic temp1 out 0 sensor/ bigt/feeds/
topic # out 0 sensor/garage/ bigt/feeds/garage_


Does anyone have any ideas on how to get this working again?

bigt
 
Posts: 7
Joined: Sun Feb 26, 2012 2:50 am

Re: MQTT bridge quit working

by gynnar on Thu Jan 11, 2018 5:45 am

Yesterday I discovered that my previously working bridge had stopped working.
For personal reasons I haven't been able to "play" with my little projects for a couple of months, so nothing in my setup had changed since May.
I'm pretty sure data had been sent to my IO- account after that.

Regenerating the AIO-key and replacing the key in my mosquitto bridge config file with the new key got everything working again.
( Not sure why, does the AIO-key expire? )
Just thougth I'd give my small contrib. It might help someone...

gynnar
 
Posts: 1
Joined: Tue Nov 29, 2016 4:58 am

Re: MQTT bridge quit working

by bigt on Thu Jan 11, 2018 9:42 pm

Thanks for replying, gynnar.

I tried changing the AIO-Key and that had no effect.

However, as long as I was mucking about in my bridge.conf, I decided to see if the topic mapping was the problem.

Turns out, whatever they changed decided it didn't like the topic statements where I'm remapping a whole tree.
Like this one: topic # out 0 sensor/garage/ bigt/feeds/garage_

When I commented those out, the bridge started working again. Guess I'll either have to figure out how to make that work again, or list out all of my topics. That may call for a script...

bigt
 
Posts: 7
Joined: Sun Feb 26, 2012 2:50 am

Please be positive and constructive with your questions and comments.