We are currently using mosquitto as a MQTT Broker to push message to multi Application clients which of them are basically mobiles.
For majority of these devices, they work fine, no matter connecting to the broker or sub/pub message(s).
However, I found that some device(s) cannot just work as fine as the others during their connection.
Here are the logs from the mosquitto when they tried to connect to the broker:
1530576623: Client iPhone_13624578 disconnected.
1530576623: New client connected from 172.16.88.101 as iPhone_13624578 (c0, k60, u'13624578').
1530576722: Outgoing messages are being dropped for client iPhone_13624578.
1530576953: Client iPhone_13624578 has exceeded timeout, disconnecting.
1530576953: Socket error on client iPhone_13624578, disconnecting.
1530577076: Client iPhone_13624578 disconnected.
1530577076: New client connected from 172.16.88.101 as iPhone_13624578 (c0, k60, u'13624578').
1530577215: Outgoing messages are being dropped for client iPhone_13624578.
1530577464: Client iPhone_13624578 has exceeded timeout, disconnecting.
1530577464: Socket error on client iPhone_13624578, disconnecting.
1530578071: Client iPhone_13624578 disconnected.
1530578071: New client connected from 172.16.88.101 as iPhone_13624578 (c0, k60, u'13624578').
1530578161: Client iPhone_13624578 has exceeded timeout, disconnecting.
1530578161: Socket error on client iPhone_13624578, disconnecting.
Is it broker side problem or a client side problem?
How to fix it?
This seems to be a problem on the client side:
The client specifies a Keepalive Interval of 60 seconds (k60).
Probably the client does not continue to send PINGREQ messages when going background.
To see this more clearly you may try to increase log output by starting mosquitto -v or by specifiying log_type all in mosquitto.conf
Have you testing an upgrade to mosquitto 1.5 ?
The idea is to be able to concentrate development efforts on the latest version
@Tifaifai Alright, we will give it a shot and let's see whether it will be solved or not.
What's going on this issue? Close this issue if you cannot convince the cause is at mosquitto.
Closing as no information for a long time. Feel free to reopen if you are having this issue yet.
I am having this issue and I cannot figure it out for the life of me. I have a Wemos d1 mini controlling led lights over MQTT, with Mosquitto broker installed in HASS.IO on a RasPi. It works fine for a couple hours then does this connect/disconnect loop.
1545268717: New client connected from 192.168.1.177 as LEDstrip (c1, k15, u'admin').
1545268740: Client LEDstrip has exceeded timeout, disconnecting.
1545268740: Socket error on client LEDstrip, disconnecting.
1545268741: New connection from 192.168.1.177 on port 1883.
[INFO] found admin on local database
1545268741: New client connected from 192.168.1.177 as LEDstrip (c1, k15, u'admin').
1545268762: Client LEDstrip has exceeded timeout, disconnecting.
1545268762: Socket error on client LEDstrip, disconnecting.
1545268764: New connection from 192.168.1.177 on port 1883.
[INFO] found admin on local database
Can someone offer any help?
I have same problem
1545268762: Client LEDstrip has exceeded timeout, disconnecting.
This means that your client has not communicated with the broker within the keepalive it configured (15 seconds), so the broker disconnected it. This is not a problem with mosquitto, it is your client that you need to look at.
Most helpful comment
This seems to be a problem on the client side:
The client specifies a Keepalive Interval of 60 seconds (
k60).Probably the client does not continue to send PINGREQ messages when going background.
To see this more clearly you may try to increase log output by starting
mosquitto -vor by specifiyinglog_type allinmosquitto.conf