akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.69k stars 1.04k forks source link

ActorSelection can have IPV4/IPV6 mapping conflicts on Mono / POSIX #2254

Closed Aaronontheweb closed 8 years ago

Aaronontheweb commented 8 years ago

http://stackoverflow.com/questions/38917902/akka-net-remote-between-linux-and-windows

Pretty sure this is the issue (repeating my SO answer):

The issue here appears to be that Mono is using an IPV6 address mapped to IPV4 in its bound address for some reason.

akka://TestSystem/system/transports/akkaprotocolmanager.tcp.0/akkaProtocol-tcp%3A%2F%2FTestSystem%40%5B%3A%3Affff%3A192.168.0.252%5D%3A36983-1

If you decode this URL that gets translated to

akkaProtocol-tcp://TestSystem@[::ffff:192.168.0.252]:36983-

So I think what is happening here is that outbound address Helios is supposed to parse from that is getting screwed up on the Linux side, so it attempts to connect to a mal-formed address that isn't the same as the one Windows listens on. Something platform-specific in the actor selection URI parsing code is incorrect I suspect.

kantora commented 8 years ago

I suppose it is connected with https://github.com/akkadotnet/akka.net/issues/2194 Mono treat any ipv4 as ipv6 and break akka addresses as well.

Aaronontheweb commented 8 years ago

@kantora yep, I suspect you are correct. What I think is happening under the hood: I think despite explicitly specifying IPV4 in the configuration, Mono sockets are still using IPV6 as the address family are performing a mapping - this is not correct and not what Helios does on Windows when provided with an IPV4 address.

I'll be working on getting Linux CI up and running for Helios shortly. Just got it working for NBench a few minutes ago.