Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Connection reset by peer messages

Okay, so the broker is Mosquitto running on a Raspberry Pi. According to the log (slightly edited to remove irrelevant stuff):

1515745472: mosquitto version 1.4.14 (build date Mon, 10 Jul 2017 23:48:43 +0100) starting

1515745472: Opening ipv6 listen socket on port 1883.
1515745473: New connection from 10.0.0.15 on port 1883.
1515745473: New client connected from 10.0.0.15 as imac (c1, k600).
1515745485: Socket error on client imac, disconnecting.

1515745488: New connection from 10.0.0.15 on port 1883.

1515751307: Client imac has exceeded timeout, disconnecting.
1515751307: Socket error on client imac, disconnecting.
1515751512: New connection from 10.0.0.15 on port 1883.

So a socket error occurred 12 secs after the client first connected, but then the client reconnected 3secs later.

As you can see, I'm using a keep alive of 600 secs. I've also programmed the client to published a message every 120 secs. But still I get an 'exceeded timeout'.

The thing is, the client reconnects fine, so it's not a huge problem per se. It's just those annoying print statements. To me, they simply don't belong there.

D

On Wed, Jan 10, 2018 at 12:16 AM, Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi Dick,

do you have access to the broker log?  If so, there may be some message which indicates why it is disconnecting the client.  I assume that for some reason, the connection to the broker is being broken, and the client is automatically reconnecting.  The broker could be the cause, or it could be elsewhere, but I'd start with the broker.

Ian




Back to the top