-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConnectionReset exception #45
Comments
According to SO the most proper way to check if a socket is connected is to check if there any bytes available to read and call |
Been having the same problem, Using MacOS and Big Sur. |
I am afraid we also started facing the same issue, would be nice if PR is reviewed and released if it solves the issue. |
We upgraded to .NET 6 from .NET Core 3.1 and see this very frequently now when running within a linux docker container. |
Can the code be changed to follow the guidance from the MSFT docs for checking connected?
|
This client was used for a long time on Windows without any issues. A couple of month ago we tried to use this client on .NET Core and we tested it on Linux and Windows.
In our project we use ZooKeeperClient a lot to read nodes and set watchers.
Windows version works flawlessly.
However, Linux version causes
Connection reset by peer
exception.I investigated this problem and read Zookeeper logs. I found out that Zookeeper didn't reset it's connection.
I didn't capture any tcp dumps, but I'm pretty sure there are no TCP RST packets.
Upgrading to .NET 5 makes the situation even worse. (ConnectionLossExceptions appear more often).
I decided to go deeper into the ZooKeeperClient code.
I found a check which causes false-detected connection loss.
Unfortunately, I was not able to detect what causes this effect and how to reproduce this problem. Looks like a problem with sockets on Linux.
Removing this check solves the problem.
Also, this client sends KeepAlive pings anyway, so if there IS a real connection loss, we will know about it in a soon time (either next time we try to send something or next ping).
The text was updated successfully, but these errors were encountered: