You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by Tien Dat PHAN <tp...@gmail.com> on 2019/10/29 10:17:06 UTC

org.apache.zookeeper.ClientCnxn - Event thread exiting due to interruption when gracefully shutting down Dubbo consumer

Dear experts

We use Zookeeper as the registry server.
When consuming our Dubbo APIs, we use the ReferenceConfig<>.get() method to get the API reference.
At the end of our execution, we destroy this connection by ReferenceConfig<>.destroy().
We noticed that even Dubbo consumer appears to shutdown gracefully, the Zookeeper connection still shows some interruption exception:

11:00:09,480 - ERROR - SimplePusher.main()-EventThread - org.apache.zookeeper.ClientCnxn - Event thread exiting due to interruption
java.lang.InterruptedException
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:502)
11:00:09,485 - INFO  - SimplePusher.main()-EventThread - org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x10029541bd10115
11:00:19,474 - WARN  - SimplePusher.main(vexacyb01dsy.dsone.3ds.com:2181) - org.apache.zookeeper.ClientCnxn - Session 0x10029541bd10115 for server vexacyb01dsy.dsone.3ds.com/10.81.149.187:2181, unexpected error, closing socket connection and attempting reconnect
java.nio.channels.ClosedByInterruptException
	at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:478)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:117)
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1144)

Besides, some WARNs from Dubbo threads:

[WARNING] thread Thread[DubboClientHandler-10.81.149.187:20881-thread-1,5,SimplePusher] will linger despite being asked to die via interruption
[WARNING] thread Thread[dubbo-client-idleCheck-thread-1,5,SimplePusher] will linger despite being asked to die via interruption
[WARNING] thread Thread[DubboMetadataReportTimer-thread-1,5,SimplePusher] will linger despite being asked to die via interruption
[WARNING] thread Thread[DubboSaveMetadataReport-thread-1,5,SimplePusher] will linger despite being asked to die via interruption
[WARNING] thread Thread[dubbo-future-timeout-thread-1,5,SimplePusher] will linger despite being asked to die via interruption
[WARNING] NOTE: 14 thread(s) did not finish despite being asked to  via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.

At the end, it still finishes the execution and returns the exit code of 0. But we just wanted to ask if this exception is harmless and can be ignored?

Best regards
Tien Dat PHAN