最近在学习使用 jepsen,使用 docker-compose 在 windows 环境和 Ubuntu20.04 环境下构建运行,不过在运行 master 分支的 zookeeper 的 case 时,每次运行会遇到随机的节点遇到 ssh 会断,报错信息如下:
WARN [2022-03-14 06:55:58,295] jepsen node n5-SendThread(jepsen-n5.jepsen_jepsen:2181) - org.apache.zookeeper.ClientCnxn Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
INFO [2022-03-14 06:55:59,697] jepsen node n5-SendThread(jepsen-n5.jepsen_jepsen:2181) - org.apache.zookeeper.ClientCnxn Opening socket connection to server jepsen-n5.jepsen_jepsen/172.18.0.4:2181
WARN [2022-03-14 06:55:59,697] jepsen node n5-SendThread(jepsen-n5.jepsen_jepsen:2181) - org.apache.zookeeper.ClientCnxn Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
我手动使用 ssh 登录 5 个节点,都能正常登录。给官方提了 issue,有社区的人回复据说 Mac 可以成功运行,我再 Mac 上尝试运行还是会报相同的错误,有大佬知道这是啥原因吗
不过社区同学推荐了使用 LXC,这个方式还没试过
Using LXC vs Docker has been very productive.