apache / apache/bookkeeper

[Test] Unit tests Zookeeper client always print Connection refused exception when connecting to the Zookeeper server

Open
#3,815 0 comments 1 reaction 0 assignees View on GitHub
area/tests flaky-tests
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

### Description
When I run BookKeeper unit tests, such as `BookieDecommissionTest#testDecommissionBookie`, the zookeeper client always print the following exceptions when connecting to the Zookeeper server.
```
2023-02-27T17:59:09,010 - WARN - [Time-limited test-SendThread(localhost:59156):ClientCnxn$SendThread@1300] - Session 0x0 for server localhost/0:0:0:0:0:0:0:1:59156, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_131]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_131]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:344) ~[zookeeper-3.8.1.jar:3.8.1]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1289) ~[zookeeper-3.8.1.jar:3.8.1]
```
I'm not sure whether it is the expected behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.