MQTT Publish intermittent failure

I just started getting intermittent publish failure on an MQTT route. The error message is;

“could not publish to broker: use of closed network connection”

This started two days ago in the early afternoon CDT. Before getting that error, I had been getting:

“could not open connection to mqtt broker: could not connect to broker within timeout”

All on the same day. But it was working fine up to this point.

Any ideas?

I’m currently using QoS of 2. But also happened with QoS of 1.

Edit: I’m getting this error too:

could not open connection to mqtt broker: network Error : EOF

Thanks,

Joe

Update:

I took a look at my route to verify my settings (even though I hadn’t changed anything but the QoS). I didn’t upload a certificate, so I hadn’t touched that section at all. But since one the errors was an EOF error, I figured I’d try to check the “Don’t verify server certificate” check box. Well, the errors went away….

But, sometimes the route doesn’t publish. I have other devices publishing to the same broker using the same username and password, so I know the problem is not the broker.

I’m still testing to see if battery voltage is skewing my results. For example, at 3.3-3.4 volts (at 113 degrees fahrenheit), there is enough juice to do a web.get but not enough to send a note.

Edit: But the notes are being sent and the route shows success. I’m testing currently testing indoors at a reasonable temperature. I’ll then test indoors on battery.

Hey @scavoj,

Sorry you’re running into issues here. We took a look on our end but it’s been tricky to debug because the issues are so intermittent and aren’t consistent.

network Error : EOF and use of closed network connection seem to point towards your client closing the connection, but that seems less likely if you’re using this same setup for other devices.

Edit: But the notes are being sent and the route shows success.

So just to confirm: Notehub is showing success but you’re not seeing the data coming through to your end client?

I’m testing currently testing indoors at a reasonable temperature. I’ll then test indoors on battery.

The specific characteristics of the device don’t matter. All the MQTT handling happens after the data makes it to Notehub.

TJ

TJ,

Or possibly the broker closing the connection since the error occurred by notehub trying to publish?

Yes, that was the case yesterday (intermittently).

But after checking the

“Enable automatic reroute on failure”

checkbox along with the “Don’t verify server certificate” checkbox today, it seems to be working. I’m going to keep testing with these settings and see what happens.

Yes, I agree with you. It’s just that things seem to get wonky when the battery gets low.

Thanks,

Joe

TJ,

After checking the above checkboxes, everything seems to be working fine.

Thanks,

Joe

1 Like