-
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
Akka Clustering failing to Serialize "Akka.Cluster.ClusterActorRefProvider" out of the box -- Causes entire cluster to break down on some machines #1692
Comments
It looks like you are doing a remote deployment as the daemonmsgcreate is involved. The provider should never be serialized, it is a big internal part of akka and is not intended to be passed across the wire. Are you using some funky constructor args to your remote actor? /Roger Skickat från min iPhone
|
Thanks, Roger, I'll take a look and see. |
Ahh yes, apparently I am passing some crazy stuff around in this case -- totally my fault -- these things can be looked up in the Actor instead of passed into the constructor. This is total PEBKAC on my end, apologies for the bug -- but thanks very much for pointing me in the right direction! 👍 |
Is it an imposed rule that Actors which are remotely deployed should not have any constructor arguments ?
|
Ctor args should work, there are however cases where it is hard to identify the correct constructor given the passed args due polymorphism and implicit conversions. Especially with the old json serializer there were cases where int/long/byte/double/float etc was mixed up as json is untyped, thus failing to find the correct ctor overload. |
I am having the same issue, but with It does: var probe = CreateTestProbe();
var @event = new TestPayload(probe.Ref);
var aw = new AtomicWrite(
new Persistent(@event, 6L, Pid, sender: ActorRefs.NoSender, writerGuid: WriterGuid)); Which ends up in the postgres provider: case StoredAsType.Json:
_serialize = e => new SerializationResult(NpgsqlDbType.Json, JsonConvert.SerializeObject(e.Payload, configuration.JsonSerializerSettings), null);
_deserialize = (type, serialized, manifest, serializerId) => JsonConvert.DeserializeObject((string)serialized, type, configuration.JsonSerializerSettings);
break; causing it to blow up on a referencing loop on Provider:
Full exception:
|
@CumpsD so the |
@Aaronontheweb it's from here: https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Persistence.TCK/Journal/JournalSpec.cs/#L282 TestPayload:
It has an
So I'm guessing the json serializer wants to serialize that. Judging from the error it is |
I've tried bypassing it with
|
Looks a bit like this guy's error: #2486 (comment) But I can't figure out what it's about :) |
I'm starting to worry this is related? Aaronontheweb/Akka.Persistence.SqlServer@b841ef4 From #3811 So, for now in Postgres tests: // TODO: hack. Replace when https://github.com/akkadotnet/akka.net/issues/3811
protected override bool SupportsSerialization => false; |
I think this is the TCK working as intended then - you're not serializing In order for this test to pass the following must be true:
Added this to see if everything is up to speed and voltage with Sql.Common: akkadotnet/Akka.Persistence.SqlServer#174 - looks like the test isn't passing here yet so I may not have finished patching the issue inside the Sql.Common yet. It's part of the 1.5 milestone but we've already implemented this change inside journals like Akka.Persistence.MongoDb, Azure, and some others. You can probably disable that test for now using the same method override and just listen for updates on #3811 |
Looks like it yeah. For the record, it's not mine, I'm simply running the tests on my .net core clone, since the AkkaContrib is still Framework. |
No worries - need us to review a PR there? |
Not really, fixed it locally by disabling those serialisation tests, like with SQL Server and I'll just keep an eye on the progress of #3811 |
I don't understand why, but it seems this issue happens on everyone on my team's machine but mine -- I checked and we're all using the same versions of Akka, etc (1.6), and JSON.NET (8.0) in the solution.
But the issue (from our log file) basically goes something like this:
The "SEED" is at address "akka.tcp://System@127.0.0.1:13337".
Relevant Log File From the "NODE" actor system:
The text was updated successfully, but these errors were encountered: