tim-group / java-statsd-client

a java statsd client library
Other
275 stars 139 forks source link

Client stuck on PortUnreachableException #45

Open francisdb opened 7 years ago

francisdb commented 7 years ago

v3.1.0

We create a single client for the lifetime of our services but after a while they get stuck on this PortUnreachableException. Probably our server is unreachable for a few seconds and the client never recovers. A restart of the service fixes the issue.

java.net.PortUnreachableException: null
    at sun.nio.ch.DatagramDispatcher.write0(DatagramDispatcher.java)
    at sun.nio.ch.DatagramDispatcher.write(DatagramDispatcher.java:51)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
    at sun.nio.ch.IOUtil.write(IOUtil.java:65)
    at sun.nio.ch.DatagramChannelImpl.write(DatagramChannelImpl.java:605)
    at com.timgroup.statsd.NonBlockingUdpSender.blockingSend(NonBlockingUdpSender.java:72)
    at com.timgroup.statsd.NonBlockingUdpSender.access$000(NonBlockingUdpSender.java:13)
    at com.timgroup.statsd.NonBlockingUdpSender$2.run(NonBlockingUdpSender.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
shankarshastri commented 7 years ago

yes I am also facing the same issue. Is there going to be a fix or a workaround?

francisdb commented 7 years ago

we switched to https://github.com/DataDog/java-dogstatsd-client

shankarshastri commented 7 years ago

How did you guys fix it in the other library?

francisdb commented 7 years ago

The problem is fixed there

shankarshastri commented 7 years ago

Will It Retry Or Raise A Exception?

shankarshastri commented 7 years ago

If statsd server is up and is stopped at midpoint. I am not getting any exception even after using java-dogstatsd-client.

francisdb commented 7 years ago

I suggest you create a new issue on that project