I'm working on an application that uses UDP-broadcast for discovery. For what it's worth, I'm using ZeroMQ's pure-java implementation project, JeroMQ (but I don't think this is germane to the problem).

I've noticed something strange when I run the application on my Mac -- It will send the broadcast once per second a few times without issue, and then I will get a NoRouteToHost exception, followed by 15-25 seconds of SocketException with the message "host is down". Then the broadcast will go through for another 4-10 seconds. The exact number of successes and failures in the cycle fluctuates a bit, but it's always roughly 5 successes followed by roughly 20 failures.

I have also observed this pattern by using the OSX native ping utility targeting any address on my subnet that doesn't respond to icmp (including [/24 subnet].255) -- A handful of "request timeout" responses (as expected) followed by exactly one "No route to host" and then a couple dozen "host is down" messages. Eventually I get another half-dozen timeouts without connection errors and the cycle repeats.

I observe this behavior on a conventional Access Point 802.11 network, and also an ad-hoc wifi network.

This issue does not happen from a Debian VM or from a Raspberry Pi running Raspbian Stretch.

OSX version 10.13.4

I've looked around online some with no success, perhaps because I'm having trouble phrasing the question?

You must log in to answer this question.

Browse other questions tagged .