Socket error on client, disconnecting. 1.4.8 on OSX. #7

Closed
ralight opened this Issue Mar 15, 2016 · 6 comments

Projects

None yet

4 participants

@ralight
Contributor
ralight commented Mar 15, 2016

migrated from Bugzilla #488633
status ASSIGNED severity normal in component Mosquitto for 1.4
Reported in version 1.4 on platform PC
Assigned to: Roger Light

On 2016-02-27 19:02:59 -0500, James Lewis wrote:

Here's the test conditions:

Localhost only.

Broker Process:
Run Mosquitto 1.4.8 in verbose mode
$ mosquitto -v

Subscriber Process:
Subscribe to localhost with a test topic "debug".
$ mosquitto_sub -h 127.0.0.1 -i testSub -t debug

Publisher Process:
Publish a message to localhost with the same test topic, "debug".
$ mosquitto_pub -h 127.0.0.1 -i testPublish -t debug -m 'Hello World'

The Broker process will report;
1456617536: New connection from 127.0.0.1 on port 1883.
1456617536: New client connected from 127.0.0.1 as testPublish (c1, k60).
1456617536: Socket error on client testPublish, disconnecting.

No errors are reported from the publish process:
1456617552: New connection from 127.0.0.1 on port 1883.
1456617552: New client connected from 127.0.0.1 as testSub (c1, k60).

On my Mac I will still see the message on the Publisher process. However, I have heard from others that they have intermittent success. Even if I use 1.4.7 or 1.4.5 versions of mosquitto_pub and mosquitto_sub the Broker process will always report a "Socket error on client."

If I change ONLY the broker to 1.4.5, the error never occurs. On the machine that has intermittent success, running 1.4.5 ss the broker (simply replacing only the mosquitto binary) results in expected functioning.

Verified firewall set to "allow incoming connections."

On 2016-03-07 17:28:25 -0500, Roger Light wrote:

Thanks for this, I've found the problem which comes from a Windows related change. I've got a fix for OSX, but need to check there are no regressions on Windows.

@robfrei
robfrei commented Jun 12, 2016

I am, unfortunately, experiencing this same problem. I've installed Mosquitto on my Mac using Home-brew (version 1.4.8). Any update on the fix? Thanks.

@silentred

same problem here. 1.4.8 installed from home-brew

@ralight ralight added this to the Fixes-next milestone Jun 13, 2016
@ralight
Contributor
ralight commented Jun 13, 2016

I apologise, this fell through the cracks for 1.4.9. I've pushed a fix that will be in the next release.

@ralight ralight closed this Jun 13, 2016
@leesohaeng

I got a same problem version 1.4.9 on OS X.
I hope this problem fix next release.


LEE-SOHAENGui-MacBook-Pro:~ sohaenglee$ /usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
1470667050: mosquitto version 1.4.9 (build date 2016-06-18 16:16:49+0100) starting
1470667050: Config loaded from /usr/local/etc/mosquitto/mosquitto.conf.
1470667050: Opening ipv4 listen socket on port 1883.
1470667050: Opening ipv6 listen socket on port 1883.
1470667051: New connection from 127.0.0.1 on port 1883.
1470667051: New client connected from 127.0.0.1 as mosqsub/15501-LEE-SOHAE (c1, k60).
1470667051: New connection from 127.0.0.1 on port 1883.
1470667051: New client connected from 127.0.0.1 as mqttjs_fbda98eb (c1, k10).
1470667062: New connection from 127.0.0.1 on port 1883.
1470667062: New client connected from 127.0.0.1 as mosqpub/15707-LEE-SOHAE (c1, k60).
1470667062: Socket error on client mosqpub/15707-LEE-SOHAE, disconnecting.
1470667330: Socket error on client mosqsub/15501-LEE-SOHAE, disconnecting.
1470667351: New connection from ::1 on port 1883.
1470667351: New client connected from ::1 as mosqsub/16056-LEE-SOHAE (c1, k60).
1470667394: New connection from ::1 on port 1883.
1470667394: New client connected from ::1 as mosqpub/16137-LEE-SOHAE (c1, k60).
1470667394: Socket error on client mosqpub/16137-LEE-SOHAE, disconnecting.
1470667683: New connection from 10.0.1.3 on port 1883.
1470667683: New client connected from 10.0.1.3 as testClient (c1, k30).
1470667737: Socket error on client testClient, disconnecting.
1470667741: Socket error on client mosqsub/16056-LEE-SOHAE, disconnecting.
1470667774: New connection from 127.0.0.1 on port 1883.
1470667774: New client connected from 127.0.0.1 as mosqsub/16495-LEE-SOHAE (c1, k60).
1470667779: New connection from ::1 on port 1883.
1470667779: New client connected from ::1 as mosqpub/16500-LEE-SOHAE (c1, k60).
1470667779: Socket error on client mosqpub/16500-LEE-SOHAE, disconnecting.
1470667780: New connection from ::1 on port 1883.
1470667780: New client connected from ::1 as mosqpub/16510-LEE-SOHAE (c1, k60).
1470667780: Socket error on client mosqpub/16510-LEE-SOHAE, disconnecting.
1470667782: New connection from ::1 on port 1883.
1470667782: New client connected from ::1 as mosqpub/16520-LEE-SOHAE (c1, k60).

1470667782: Socket error on client mosqpub/16520-LEE-SOHAE, disconnecting.

sub : mosquitto_sub -h 127.0.0.1 -t topic/state
pub : mosquitto_pub -h 127.0.0.1 -t topic/state -m "testtest"

@ralight
Contributor
ralight commented Aug 8, 2016

This is fixed in the fixes branch and will be released as part of 1.4.10.

@leesohaeng

very thanks ralight~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment