Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mosquitto 1.4.15: Socket error on client 'xxx', disconnecting. #875

Closed
dxGuan opened this issue Jul 3, 2018 · 8 comments
Closed

Mosquitto 1.4.15: Socket error on client 'xxx', disconnecting. #875

dxGuan opened this issue Jul 3, 2018 · 8 comments
Labels
Status: Blocked Another issue needs to be resolved first

Comments

@dxGuan
Copy link

dxGuan commented Jul 3, 2018

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?

@ckrey
Copy link

ckrey commented Jul 4, 2018

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

@Tifaifai
Copy link
Contributor

Tifaifai commented Jul 4, 2018

Have you testing an upgrade to mosquitto 1.5 ?
The idea is to be able to concentrate development efforts on the latest version

@dxGuan
Copy link
Author

dxGuan commented Jul 5, 2018

@Tifaifai Alright, we will give it a shot and let's see whether it will be solved or not.

@toast-uz
Copy link
Contributor

What's going on this issue? Close this issue if you cannot convince the cause is at mosquitto.

@toast-uz toast-uz added the Status: Blocked Another issue needs to be resolved first label Jul 27, 2018
@toast-uz
Copy link
Contributor

toast-uz commented Sep 9, 2018

Closing as no information for a long time. Feel free to reopen if you are having this issue yet.

@toast-uz toast-uz closed this as completed Sep 9, 2018
@JayRabxx
Copy link

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?

@SamZaitcev
Copy link

I have same problem

@ralight
Copy link
Contributor

ralight commented Feb 14, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Blocked Another issue needs to be resolved first
Projects
None yet
Development

No branches or pull requests

7 participants