Closed gengle closed 7 years ago
Duplicate of: https://github.com/akkadotnet/akka.net/issues/2754
TL;DR;, you're doing the right thing but we're not handling this error message (which gets thrown even if the shutdown is clean) by DotNetty. We're going to need to prune it out of the logs. We had this issue with Helios too, the previous transport. It's an underlying issue with having to abort the async socket when it's waiting on an incoming receive and just not handling it properly.
Aarron - is there a commit I could reference to understand how the Helios bug was handled? I can take a stab at resolving as I can't have the production logs polluted with this.
Sure thing @gengle - here's the PR that @maxcherednik submitted to resolve this issue with Helios back in January, right before our 1.1.3 patch: https://github.com/akkadotnet/akka.net/pull/2453
You can send in the PR to the dev
or the v1.3
branch. If you send it into dev
we'll treat this as a bugfix for the 1.2.* branch of Akka.NET and be able to submit a release a small patch. If it goes into v1.3
we might have to take a little bit longer since that's part of a much larger planned release.
Thanks @Aaronontheweb - after a preliminary review, looks like we need to throw InvalidAssociationException
for this System.Net.Sockets.SocketException
instance. I'll take a stab at this over the weekend, I'll target dev
so we can get this released sooner than v1.3
(netstandard support; super stoked!)
I'll use #2754 moving forward
Ok, I'll close this and we can use #2754 as the issue going forward. Thanks for agreeing to help with this. Much appreciated! It might be as simple as checking the exception and not propagating it, but the test suite will help guide you on that.
Background
I have 3 nodes, using the following roles respectively:
The client node is a command line utility which uses a Clustered Routing Group against the api node. Once the command line utility completes, it terminates itself.
Issue
Immediately after the [client] node terminates, I receive the following errors in both [lighthouse] and [api] nodes.
I've tried initiating
Question
How do I properly prevent such errors from happening.
I've tried the following with little success.
explicitly calling leave, and terminating the node.
using a ManualResetEvent, and waiting for RegisterOnMemberRemoved
What am I missing?