These are chat archives for akkadotnet/akka.net

2nd
Aug 2017
Ricky Blankenaufulland
@ZoolWay
Aug 02 2017 07:49
Hm, when should we dispose Akka.Streams Materializers? Whenever something implements IDisposable I want to dispose it someday ;)
Ricky Blankenaufulland
@ZoolWay
Aug 02 2017 07:55
Just in case, I am speaking of instances of ActorMaterializer here.
Ilya Komendantov
@IlyaKomendantov_twitter
Aug 02 2017 11:10
I have an error, it says that Hyperior does not support serialization of generic IDictionary <TKey, TValue> ? I got this error when trying to persist ReadOnlyDictionary<Guid, SomeImmutableClass>() ...
will this be fixed? Workaround switch to default serialization
alt
Ricky Blankenaufulland
@ZoolWay
Aug 02 2017 12:03
@IlyaKomendantov_twitter Have you tried using ImmutableDictionary instead of ReadOnlyDictionary? Not sure it works but I use the System.Collections.Immutable types for all types of collections in my messages
Ilya Komendantov
@IlyaKomendantov_twitter
Aug 02 2017 12:03
will try, thank you!
Maxim Cherednik
@maxcherednik
Aug 02 2017 12:50
Guys, why I might receive something like this:
AssociationError [akka.tcp://riskengine@10.35.0.66:4053] <- akka.tcp://riskengine@10.55.0.130:4054: Error [Ned a cluster message class to be able to deserialize bytes in ClusterSerializer.] [ at Akka.Cluster.Proto.ClusterMessageSerializer.FromBinary(Byte[] bytes, Type type)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Akka.Remote.Serialization.MessageContainerSerializer.FromBinary(Byte[] bytes, Type type)
at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, SerializedMessage message, IActorRef senderOption)
at Akka.Remote.EndpointReader.<Reading>b__11_1(InboundPayload inbound)
at lambda_method(Closure , Object , Action1 , Action1 , Action1 ) at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture4.Handle(T value)
at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)]
version incompatibility?
Arjen Smits
@Danthar
Aug 02 2017 12:58
@maxcherednik that would be my guess
Maxim Cherednik
@maxcherednik
Aug 02 2017 12:59
any ideas what exactly to check ?
I am using Akka 1.2.3
Arjen Smits
@Danthar
Aug 02 2017 12:59
are you sure both sides of the association are using the same version ?
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:00
should be
unless some binding redirection "helped" me here
Arjen Smits
@Danthar
Aug 02 2017 13:02
Hmm. That depends on how you updated :P
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:02
I don't see anything strange though...
Arjen Smits
@Danthar
Aug 02 2017 13:02
but the error message itself is strange as well. Its not something thats currently in the codebase
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:03
wow... really ?
how so
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:03
or you mean it's gone after 1.2.3
Arjen Smits
@Danthar
Aug 02 2017 13:07
Might be in previous versions. But in a different form. There has been some refactoring since 1.2.0
But github search is not helping. Its lies to me at the best of time, (saying something is not there, then when i look manually it is there)
But either way @maxcherednik its not something that should happen.
Arjen Smits
@Danthar
Aug 02 2017 13:12
So its either a bug, in which case the cluster sub system is handling a message which it should not be handling. (seems unlikely, because there'd would have to be a number of bugs for that to happen). Or you got some wierd version issues going on
If you can reproduce it in isolation. that would help
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:16
Sure, I will keep observing
btw... that pull request I was working on 1.1.3 for cleaning up helios exception logging... it seems we have very same issue after moving to dotnetty... Is someone on it?
I can try to do the same again
Arjen Smits
@Danthar
Aug 02 2017 13:24
Yes we do. And Yes that would help
Maxim Cherednik
@maxcherednik
Aug 02 2017 13:25
ok. I will try to have look.
jalchr
@jalchr
Aug 02 2017 13:29
Guys, anyone has an idea whether these distributedPubSubMediator dead letters are "normal" or not ?
Mayadeen.Archive.Api.Startup: 2017-08-02 16:22:34,843 [1] INFO  Mayadeen.Archive.Api.Startup - ActorSystem Started !
Mayadeen.Archive.Api.Startup: 2017-08-02 16:22:34,850 [1] INFO  Mayadeen.Archive.Api.Startup - ASP.NET application started !
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:35,386 [14] WARN  Archive.Shared.Cluster.ClusterStatus - ClusterLeader is null
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:35,597 [7] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 7 dead letters encountered.
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:36,609 [10] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 8 dead letters encountered.
Akka.Cluster.ClusterCoreDaemon: 2017-08-02 16:22:37,061 [14] INFO  Akka.Cluster.ClusterCoreDaemon - Welcome from [akka.tcp://ArchiveSystem@127.0.0.1:4053]
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:37,109 [13] INFO  Archive.Shared.Cluster.ClusterStatus - MemberUp: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:4053, Uid=1274350894 status = Up, role=[lighthouse], upNumber=1), Role(s): lighthouse
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:37,130 [13] INFO  Archive.Shared.Cluster.ClusterStatus - IMemberEvent: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:16666, Uid=857867957 status = Joining, role=[web], upNumber=2147483647), Role(s): web
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:37,139 [13] INFO  Archive.Shared.Cluster.ClusterStatus - MemberUp: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:16667, Uid=1459050170 status = Up, role=[exporter], upNumber=2), Role(s): exporter
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:37,452 [9] INFO  Archive.Shared.Cluster.ClusterStatus - IMemberEvent: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:16666, Uid=857867957 status = Joining, role=[web], upNumber=2147483647), Role(s): web
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:37,621 [10] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 9 dead letters encountered.
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:38,463 [10] INFO  Archive.Shared.Cluster.ClusterStatus - MemberUp: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:16666, Uid=857867957 status = Up, role=[web], upNumber=3), Role(s): web
Archive.Shared.Cluster.ClusterStatus: 2017-08-02 16:22:38,954 [11] INFO  Archive.Shared.Cluster.ClusterStatus - MemberUp: Member(address = akka.tcp://ArchiveSystem@127.0.0.1:16666, Uid=857867957 status = Up, role=[web], upNumber=3), Role(s): web
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:40,733 [11] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 1 dead letters encountered.
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:42,685 [12] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 2 dead letters encountered.
Akka.Actor.EmptyLocalActorRef: 2017-08-02 16:22:43,698 [12] INFO  Akka.Actor.EmptyLocalActorRef - Message Status from akka.tcp://ArchiveSystem@127.0.0.1:4053/system/distributedPubSubMediator to akka://ArchiveSystem/system/distributedPubSubMediator was not delivered. 3 dead letters encountered.
Sean Templeton
@seantempleton
Aug 02 2017 13:31
Is there any way I can create my own base actor class that will be able to always handle a certain message type I define? So I don't have to go manually put the exact same code in every actor? If I inherit from ReceiveActor, any call I make to Receive() will get overridden by my derived class when it calls Become().
Arjen Smits
@Danthar
Aug 02 2017 13:42
@seantempleton Thats exactly how Become is supposed to work. If you want to keep your 'base' handlers. You'd have to re-register them.
Easiest way to do that, is by defining a method on your baseclass which contains your Receive handlers. And call that when your doing a become
So something like:
Become(MyNewConfig);

private void MyNewConfig() {
    Receive<string>(s => { /* something new */});

    this.RegisterBaseHandlers();
}
Sean Templeton
@seantempleton
Aug 02 2017 13:47
@Danthar Thanks for the reply. I was suspecting that would be the answer. It's frustrating because that violates the DRY principle. And then it's super easy to forget to do that when creating a new actor. At some point you're left scratching your head and wondering why something doesn't work because you forgot one line of code. Maybe I can define my own Become function in my base class, have that register the base handler, and then call the original function the child wanted.
Arjen Smits
@Danthar
Aug 02 2017 13:48
@jalchr no. But it looks like you are initialising the distributed pubsub, before your node has completed joining the cluster. Try subscribing to the member cluster events using the ClusterClient api. And start the distributed pubsub mediator after your node joined the cluster.
@seantempleton that would work as well. In Java land, they'd use traits to do this sort of thing
Notour
@notour
Aug 02 2017 13:51
hi, is there a specific configuration to use ClusterClientReceptionist ? i use the default config and with multiple node my cluster crash due to the receptionist.
cf : https://stackoverflow.com/questions/45462561/akka-net-clusterclientreceptionist-multinode-crash
Thanks
Maxim Cherednik
@maxcherednik
Aug 02 2017 15:16
guys, qot a q regarding Akka.Cluster.Tools.Singleton.ClusterSingletonManager behavior. Let's say I have 3 nodes. Singleton initialized somewhere. That node dies. Singleton supposed to move to another not immediately or ?
Maxim Cherednik
@maxcherednik
Aug 02 2017 15:28
I just have some strange behavior - singleton does not take over... and remote watch also doesn't work
Aaron Stannard
@Aaronontheweb
Aug 02 2017 15:35
@maxcherednik the singleton should move if the node gracefully leaves
or if it becomes unreachable
Marc Piechura
@marcpiechura
Aug 02 2017 17:04
@ZoolWay you need to keep it as long as the streams run you've created with it
Ricky Blankenaufulland
@ZoolWay
Aug 02 2017 17:06
@Silv3rcircl3 hm, I disposed it when the Task completed and where I also dispose the stream. It did not work, instead the stream was no longer transfered (working with a remote actor).
Maybe I would have to wait until it was fully received there and send a message back...
jalchr
@jalchr
Aug 02 2017 17:25
@Danthar Actually I'm using the defaults. I'm not doing any "manual" initialization of any sort. May be something with cluster config ?
I wonder if there any tool or utility that can check the consistency of all nodes including dll versions, serialization and compatibility. Cause based on my observations, an old dll in a certain node may cause "association" issues.
Marc Piechura
@marcpiechura
Aug 02 2017 17:55
@ZoolWay could you show your code?
Maxim Cherednik
@maxcherednik
Aug 02 2017 19:48
@Aaronontheweb Will try to make a clean test tomorrow. It was working before... and now I realized that take over works only when the broken node gets back to the cluster.
Aaron Stannard
@Aaronontheweb
Aug 02 2017 19:58
ah, good to know
by all means please file an issue
Maxim Cherednik
@maxcherednik
Aug 02 2017 20:00
of course, I will try to reproduce... the actual thing started after I updated from 1.1.3 to 1.2.3. But I will setup a clean env tomorrow so that to reproduce. It might be some nuget update traces, cause my remote watch also stopped working.
Maxim Cherednik
@maxcherednik
Aug 02 2017 20:17
@Aaronontheweb which is the latest branch to create a pull request from?
dev ?
Aaron Stannard
@Aaronontheweb
Aug 02 2017 20:17
dev is the latest stable release branch
Maxim Cherednik
@maxcherednik
Aug 02 2017 20:17
ok... will have a look this logging issue
Aaron Stannard
@Aaronontheweb
Aug 02 2017 20:18
although we're supposed to be code complete on 1.3 this week
provided that we get a few more PRs merged in