These are chat archives for akkadotnet/akka.net

23rd
Jun 2017
Vagif Abilov
@object
Jun 23 2017 06:41
Hello everyone. New day, new questions... I switched to dot-netty remoting and this server configuration works fine:
remote {
dot-netty.tcp {
port = 1954
hostname = 127.0.0.1
}
}
However, if I change the hostname to 0.0.0.0 then I get the following error:
Dropping message [Akka.Actor.ActorSelectionMessage] for non-local recipient ["[akka.tcp://XXX@127.0.0.1:1954/]"] arriving at ["akka.tcp://XXX@127.0.0.1:1954"] inbound addresses ["akka.tcp://XXX@0.0.0.0:1954"]
Shouldn't I be able to specify 0.0.0.0 address to accept both local and remote connections?
Aaron Stannard
@Aaronontheweb
Jun 23 2017 12:42
set public-hostname = 127.0.0.1
Vagif Abilov
@object
Jun 23 2017 12:42
Thx!
Aaron Stannard
@Aaronontheweb
Jun 23 2017 12:42
0.0.0.0 isn't a valid address for outbound connections
but you can set the socket to listen in on it though
Vagif Abilov
@object
Jun 23 2017 12:44
But if set public-hostname to 127.0.0.1 will it be reachable from a different machine?
Aaron Stannard
@Aaronontheweb
Jun 23 2017 12:44
ah, no
Vagif Abilov
@object
Jun 23 2017 12:45
So what would the right configuration for remoting across machines?
Aaron Stannard
@Aaronontheweb
Jun 23 2017 12:45
TL;DR; Akka.Remote demands that the address it identifies itself with (public-hostname) be a reachable IP address
Aaron Stannard
@Aaronontheweb
Jun 23 2017 15:52
@/all Akka.NET v1.2.1 is going live: akkadotnet/akka.net#2790
Maxim Cherednik
@maxcherednik
Jun 23 2017 15:53
Cool!
Aaron Stannard
@Aaronontheweb
Jun 23 2017 15:55
build server is a bit backed up at the moment, but I expect the binaries to be published within a couple of hours
last couple of weeks have been heavy-traffic with the amount of stuff going on in the v1.3 branch and we're working on speeding up our CI process by getting smarter about knowing which tests don't need to be run on each change
so we can perform incremental builds instead of full ones
growing pains for a large test base that's now starting to be run on 4 platforms instead of just 2
we do .NET Core on Linux as well as Windows
1.2.1 primarily solves the issues with nodes being stuck leaving / joining a cluster
so if you're an Akka.Cluster user, this patch is an important one for you
Alex Gibson
@crucifieddreams
Jun 23 2017 15:58
Good work on 1.2.1 @Aaronontheweb we will pick it up and integrate it on Monday
Aaron Stannard
@Aaronontheweb
Jun 23 2017 15:58
thanks! It was a pain in the ass tracking that bug down
but I can sleep better knowing that the SurviveNetworkInstabilitySpec now passes without issue
Alex Gibson
@crucifieddreams
Jun 23 2017 15:59
:) I'm sure there will be many happy end users
Aaron Stannard
@Aaronontheweb
Jun 23 2017 16:03
I think so
the changes in v1.3 are going to be pretty awesome - hoping to get that out on-time as well although we still have a ton of work to do there; possible that it might run a bit late given the scope and scale of what all is changing
we're also pretty close to getting our first set of .NET Core benchmarks up and running
Akka.NET should see a lot of performance benefits for free there
with the underlying improvements that have been made to things like ConcurrentQueue and lots of other primitives
so, exciting times ahead. I'll be curious to see how the adoption skews for .NET Core vs. .NET 4.*
my guess is it's going to be our startup users who hop onto .NET Core first
given that they have lower institutional risk (i.e. they're not supporting a piece of banking software that manages billions of dollars in accounts every day)
but we'll see!
Aaron Stannard
@Aaronontheweb
Jun 23 2017 16:09
IMHO, one more thing about v1.3
C#7 syntax is a godsend
for working with actors
most of the core team has started using it where applicable
makes the code tremendously easier to read
with all of the pattern matching and the name binding
Andrey Leskov
@andreyleskov
Jun 23 2017 16:31
so we'll say goodby to famous Msg.Match().With<MsgA>() ?
Ismael Hamed
@ismaelhamed
Jun 23 2017 17:13

@Horusiath I just realized, the Context.Sender inside the callback of a Persist() becomes the journal actor when using the new BatchingJournal (this doesn't happen with previous journal). I haven't have the time to check whether this is actually a bug or I made a mistake while implementing the Oracle driver.

@Aaronontheweb @Horusiath Despite akkadotnet/akka.net#2735, we're still seeing this. I've figured out this much:

public void Persist<TEvent>(TEvent @event, Action<TEvent> handler)
{
    var sender = Sender;
    _pendingStashingPersistInvocations++;
    _pendingInvocations.AddLast(new StashingHandlerInvocation(@event, o =>
    {
        var newSender = Sender; // NOTE: when using the BatchingJournal, Sender becomes the journal actor itself
        handler((TEvent)o);
    }));
    _eventBatch.AddFirst(new AtomicWrite(new Persistent(@event, persistenceId: PersistenceId,
        sequenceNr: NextSequenceNr(), writerGuid: _writerGuid, sender: Sender)));
}

So I guess this is due to the asynchronous nature of the BatchingJournal

Vagif Abilov
@object
Jun 23 2017 17:35
Great news, @Aaronontheweb!
Natan Vivo
@nvivo
Jun 23 2017 17:38
@Aaronontheweb waiting impatiently for the nuget package. =)
What I have been surprised about C#7 is returning tuples. ridiculously useful, got rid of tons of temporary classes that existed just to return 2 values from a method
I knew it was there, but once I started using them I really saw the difference
Aaron Stannard
@Aaronontheweb
Jun 23 2017 18:23
yeah, that's phase 2 of C#7 stuff for me
phase 1 is replacing a ton of pattern matching gunk
and using local functions where we used to have inline delegates
im sure there's tons of uses for native tuples
we have a bunch of nasty classes that rely on the old school Tuple<T1,T2> style stuff
@andreyleskov yeah, eventually
we're replacing our uses of it internally with the new switch syntax
although we replaced tons of stuff with ReceiveActors
there's still a ton of stuff that uses matching - our FSMs in particular
Andrey Leskov
@andreyleskov
Jun 23 2017 18:27
@Aaronontheweb It is The Great Fall of switch anti-pattern ) now switch is welcome )
Aaron Stannard
@Aaronontheweb
Jun 23 2017 18:27
lol
it's definitely much more useful now than it has been historically
previously it'd only make sense to use it on something like an Enum
Aaron Stannard
@Aaronontheweb
Jun 23 2017 18:32
@nvivo packages are going live on NuGet now
Natan Vivo
@nvivo
Jun 23 2017 23:13
bad news. it seems something is still not working with the cluster
Aaron Stannard
@Aaronontheweb
Jun 23 2017 23:13
argh!
what appears to be the trouble?
Natan Vivo
@nvivo
Jun 23 2017 23:13
Just commented on #2584
updated everything, one node still won't join
Aaron Stannard
@Aaronontheweb
Jun 23 2017 23:14
can you turn on debug logs
the important ones that I need to see are the vectorclock messages and merge messages
tells me what the cluster nodes are saying to each other and whose gossip is trumping whose
Natan Vivo
@nvivo
Jun 23 2017 23:15
which flags do I turn on?
Aaron Stannard
@Aaronontheweb
Jun 23 2017 23:15
akka.loglevel = DEBUG should be enough
it'll show up automatically
otherwise
Natan Vivo
@nvivo
Jun 23 2017 23:16
ok, let me try
Aaron Stannard
@Aaronontheweb
Jun 23 2017 23:16
that'd be super helpful
because if the issue is still happening and it wasn't fixed by 1.2.1, it means that spec still misses this case
only way I can really investigate is seeing the gossip reports
@nvivo crap, sorry about this
need one more setting turned on
Aaron Stannard
@Aaronontheweb
Jun 23 2017 23:22
actually no, you should be good - I take that back
was looking at the wrong thing
these are what I need
[DEBUG][6/20/2017 12:18:25 AM][Thread 0034][[akka://webcrawler/system/cluster/core/daemon#486810864]] [Initialized] Received GossipStatus(from=UniqueAddress: (akka.tcp://webcrawler@127.0.0.1:4053, 40198207), version=VectorClock(akka.tcp://webcrawler@127.0.0.1:12333-1430239033->2, akka.tcp://webcrawler@127.0.0.1:12333-853399868->2, akka.tcp://webcrawler@127.0.0.1:16666-54369554->4, akka.tcp://webcrawler@127.0.0.1:4053-40198207->36, akka.tcp://webcrawler@127.0.0.1:50070-660291545->1, akka.tcp://webcrawler@127.0.0.1:50074-731862939->4, akka.tcp://webcrawler@127.0.0.1:50150-1885380326->1))
[DEBUG][6/20/2017 12:18:27 AM][Thread 0039][[akka://webcrawler/system/cluster/core/daemon#486810864]] [Initialized] Received GossipStatus(from=UniqueAddress: (akka.tcp://webcrawler@127.0.0.1:16666, 54369554), version=VectorClock(akka.tcp://webcrawler@127.0.0.1:12333-1430239033->2, akka.tcp://webcrawler@127.0.0.1:12333-853399868->2, akka.tcp://webcrawler@127.0.0.1:16666-54369554->4, akka.tcp://webcrawler@127.0.0.1:4053-40198207->36, akka.tcp://webcrawler@127.0.0.1:50070-660291545->1, akka.tcp://webcrawler@127.0.0.1:50074-731862939->4, akka.tcp://webcrawler@127.0.0.1:50150-1885380326->1))
[DEBUG][6/20/2017 12:18:27 AM][Thread 0034][[akka://webcrawler/system/cluster/core/daemon#486810864]] [Initialized] Received GossipStatus(from=UniqueAddress: (akka.tcp://webcrawler@127.0.0.1:4053, 40198207), version=VectorClock(akka.tcp://webcrawler@127.0.0.1:12333-1430239033->2, akka.tcp://webcrawler@127.0.0.1:12333-853399868->2, akka.tcp://webcrawler@127.0.0.1:16666-54369554->4, akka.tcp://webcrawler@127.0.0.1:4053-40198207->36, akka.tcp://webcrawler@127.0.0.1:50070-660291545->1, akka.tcp://webcrawler@127.0.0.1:50074-731862939->4, akka.tcp://webcrawler@127.0.0.1:50150-1885380326->1))
[DEBUG][6/20/2017 12:18:29 AM][Thread 0032][[akka://webcrawler/system/cluster/core/daemon#486810864]] [Initialized] Received GossipStatus(from=UniqueAddress: (akka.tcp://webcrawler@127.0.0.1:50252, 260039022), version=VectorClock(akka.tcp://webcrawler@127.0.0.1:12333-1430239033->2, akka.tcp://webcrawler@127.0.0.1:12333-853399868->2, akka.tcp://webcrawler@127.0.0.1:16666-54369554->4, akka.tcp://webcrawler@127.0.0.1:4053-40198207->36, akka.tcp://webcrawler@127.0.0.1:50070-660291545->1, akka.tcp://webcrawler@127.0.0.1:50074-731862939->4, akka.tcp://webcrawler@127.0.0.1:50150-1885380326->1))
and these ones
[DEBUG][6/18/2017 4:05:14 PM][Thread 0029][[akka://MultiNodeClusterSpec/system/cluster/core/daemon#1087194642]] "Couldn't establish a causal relationship between "remote" gossip and "local" gossip - Remote[Gossip(members = [Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, Uid=829060428 status = Up, role=[], upNumber=1), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597, Uid=820594903 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50599, Uid=2023916882 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50601, Uid=2015451357 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50602, Uid=991187801 status = Up, role=[], upNumber=2)], overview = GossipOverview(seen=[UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, 829060428)], reachability=Reachability([akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597, 820594903): Reachable [Reachable] (7)], [akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50602, 991187801): Unreachable [Unreachable] (4)], [akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50601, 2015451357): Unreachable [Unreachable] (6)], [akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50599, 2023916882): Unreachable [Unreachable] (5)])), version = VectorClock(akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594-829060428->15, akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597-820594903->2)] - Local[Gossip(members = [Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, Uid=829060428 status = Up, role=[], upNumber=1), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597, Uid=820594903 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50599, Uid=2023916882 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50601, Uid=2015451357 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50602, Uid=991187801 status = Up, role=[], upNumber=2)], overview = GossipOverview(seen=[UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597, 820594903)], reachability=Reachability([akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50602 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, 829060428): Unreachable [Unreachable] (1)][akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50601 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, 829060428): Unreachable [Unreachable] (1)][akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50599 -> UniqueAddress: (akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, 829060428): Unreachable [Unreachable] (1)])), version = VectorClock(akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594-829060428->12, akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597-820594903->4, akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50599-2023916882->1, akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50601-2015451357->1, akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50602-991187801->1)] - merged them into [Gossip(members = [Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50594, Uid=829060428 status = Up, role=[], upNumber=1), Member(address = akka.trttl.gremlin.tcp://MultiNodeClusterSpec@localhost:50597, Uid=820594903 status = Up, role=[], upNumber=2), Member(address = akka.trttl.gremlin.tcp://M
if I can get those logs from the leader and the node that was stuck
and maybe one other peer in the cluster
that will be very helpful
Natan Vivo
@nvivo
Jun 23 2017 23:28
ok