Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » mosquitto refuses connection sometimes
mosquitto refuses connection sometimes [message #1838352] Mon, 22 February 2021 19:00 Go to next message
Sven Schwarz is currently offline Sven SchwarzFriend
Messages: 2
Registered: February 2021
Junior Member
Hi together,

my mosquitto sometimes refuses connections.
I used the mosquitto_pub command to publish messages from another device.
This is working fine but sometimes I get "Error: Connection refused".
First I thought it is a client problem. So I tried the paho mqtt C client.
But the result is the same. Sometimes 10 out of 10 publishes are working but sometimes
with 4 or more of 10 I get "Connection refused".
So I think the problem is on the mosquitto side.

Any Ideas?
Help is very appreciated!

Regards
Sven
Re: mosquitto refuses connection sometimes [message #1838437 is a reply to message #1838352] Wed, 24 February 2021 23:00 Go to previous messageGo to next message
Roger Light is currently offline Roger LightFriend
Messages: 90
Registered: September 2013
Member
Hi Sven,

It's a bit difficult to say anything without more details. What version of Mosquitto are you using, and on what platform (Windows/Linux/...)? Does the problem go away by itself, or do you have to restart Mosquitto? Are the clients on a different computer to the broker? Is there anything interesting about the networking which could be causing the problem?

Regards,

Roger
Re: mosquitto refuses connection sometimes [message #1838474 is a reply to message #1838437] Thu, 25 February 2021 19:12 Go to previous message
Sven Schwarz is currently offline Sven SchwarzFriend
Messages: 2
Registered: February 2021
Junior Member
Roger Light wrote on Thu, 25 February 2021 00:00
Hi Sven,

It's a bit difficult to say anything without more details. What version of Mosquitto are you using, and on what platform (Windows/Linux/...)? Does the problem go away by itself, or do you have to restart Mosquitto? Are the clients on a different computer to the broker? Is there anything interesting about the networking which could be causing the problem?

Regards,

Roger

Hi Roger,

thanks for your interest on my problem.
I know it's not much information by now so here more:

I run mosquitto on a raspberry pi running arch linux.
The problem goes away and comes back without any pattern.
I tried to set the shortest republish interval to something bigger than one or two minutes, since I was afraid the there where too much publishes from this node but that did not change anything.
It is possible that 8 of 10 messages work an 2 are denied, but also 8 of 10 denials are possible.
I tried to set the log type to debug to see more in the mosquitto log file. But there is nothing about the refused connections. I can see this only from the client side.
The client is connected via wifi to the network. I cannot see any problems there. My ssh connection to the client from my notebook is stable.

All my shelly devices work fine and I can't see any similar behavior there.
I use node-red to control all devices and this also is working without outages.

What's confusing me is, that I cannot reproduce these "refused connections" sending the same mosquitto_pub messages from my notebook. So it has to be a problem of this one client.
If the wifi connection was bad, I would expect to see a timeout before an error but the denial comes
immediately.

I'm running a bit out of ideas what else to try to analyse the problem.


Regards
Sven
Previous Topic:Connection error
Next Topic:How to find a client IP
Goto Forum:
  


Current Time: Thu Apr 25 19:35:58 GMT 2024

Powered by FUDForum. Page generated in 0.03052 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top