-
Notifications
You must be signed in to change notification settings - Fork 1k
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
The first of multiple enabled Transports is used #7378
Comments
Interesting - the addressing system into Akka.Remote's akka {
loglevel = "DEBUG" # Sets the global log level to DEBUG for more detailed logging.
log-config-on-start = on # Log the full configuration on startup for debugging purposes.
actor {
debug {
receive = on # Enable detailed logging for received messages.
autoreceive = on # Enable logging for auto-received messages (e.g., Lifecycle hooks).
lifecycle = on # Enable logging for actor lifecycle events.
unhandled = on # Log warnings for unhandled messages.
fsm = on # Enable logging for FSM (Finite State Machine) transitions.
event-stream = on # Enable event stream logging.
}
}
remote {
log-remote-lifecycle-events = on # Log lifecycle events for remote actors (e.g., remote association).
log-remote-events = on # Additional remote event logging (useful for debugging).
}
}
|
I collected the Logfiles for the scenarios, and the wireshark traces (see attached Remoting Scenarios.zip). |
Oh boy, I think I know what the problem is - it's not the outbound transmission on the |
This is the issue
Followed by akka.net/src/core/Akka.Remote/Remoting.cs Lines 210 to 211 in 902daf5
We always select the address at the front of the transport list to be the default |
Switching between possible addresses is probably the right way to solve this problem, but the issue (from my side of the table) is that:
I'll mull it over, but I think there might be a way we can minimize the costs of the latter so it doesn't have an adverse effect on performance. I agree that this is a bug though and it should be fixed. |
Hi Aaron, |
Other observation: I guess (or hope) that this is just another incarnation of this same issue ?? |
Yes I think so @DSanchen - and I have some good news: I am pretty sure this is an isolatable issue inside the The probably ultimately gets encoded here: akka.net/src/core/Akka.Remote/Transport/AkkaPduCodec.cs Lines 556 to 564 in 5e2bd0e
But I think it's the wrong address being fed into this actor further up the food chain - this code is just doing what it's told. I am pretty confident we could write a reproduction spec for this and track the problem down that way. |
Added to prove the existence of akkadotnet#7378
Added a reproduction here #7391 - bad news - I was not able to reproduce your issue, so this might actually be a bug with your Named Pipe transport implementation. You can copy my spec and apply it to your transports - let me know if you get a different result! In the meantime, I can also try tweaking this spec (or |
Added to prove the existence of #7378
In PingAndVerify():
And, yes, when using the ActorSelection-Object instead of a ResolveOne()-ed IActorRef in my client test app (using my pipe-transport), it works... |
@DSanchen I'll go give that a try and see what I find! |
Yep, I can reproduce your failure - so there's 100% a real bug in Akka.Remote then. THANK YOU for helping my tweak the test to find it. |
Need to ensure we use `RemoteActorRef` instead of `ActorSelection` in order to properly reproduce bug
I think I have this issue fixed here #7393 - waiting to see what the build system reports back on the other tests, but that fix definitely fixed the reproduction spec |
…ress` when using multiple transports (#7393) * harden specs for #7378 Need to ensure we use `RemoteActorRef` instead of `ActorSelection` in order to properly reproduce bug * changed up `ActorSystem` names to make it easier to debug * fixed outbound address serialization close #7378 * fixed compilation issue
Version Information
Version of Akka.NET? - 1.5.30
Which Akka.NET Modules? - Akka.Remote, Akka.Hosting
Describe the bug
It seems to me that the remote actor system chooses the first enabled transport as the (only) one to communicate payload data to a local actor system, no matter which transport the local actor system specified in the actor selection.
To Reproduce
I tested four setups with two Transports: using my own NamedPipe-Transport (that - as the name suggests - uses Windows Named Pipes as communication medium, specifying "akka.pipe" as protocol) AND the default DotNetty.TCP (with the default akka.tcp protocol). Both the remote and the local actor system enable the two transports. On the remote actor system I switch the order of the enabled transports, in the local actor system I use the actor selection based on the different transport-protocols. I'm tracing network traffic with Wireshark looking at the loopback interface (as my tests are on the same machine), filtering on the port that I specify in the actor system configuration (e.g. port 5001).
Environment
Windows, .NET 8.0
Additional context
Problem is: When the remote actor system specifies enabled-transports: [ pipe, tcp ] and the local actor system (this time running on another machine) wants to connect to the remote actor system using actor selection as akka.tcp://... no communication at all takes place, as (obviously) no named pipe can be established between the two machines.
Am I doing something wrong or have I misunderstood the Idea of having multiple transports ?
The text was updated successfully, but these errors were encountered: