Skip to content

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

Open
@hangc0276

Description

@hangc0276

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions