Wire incompatibility between Akka 2.4.20 and 2.5.12?

Hello,

we’re trying to do a rolling upgrade of our production app that is running Akka 2.4.20 to the new version that is running Akka 2.5.12. However, when we try to do remote actor creation from the new version on a node that is running the old version we get a serialization warning (see below) complaining that some Config object can’t be deserialized. But we’re not sending any Config object ourselves. Because of the serialization problem the remote actor can’t be created.

[WARN] [07/06/2018 17:42:40.006] [test-akka.remote.default-remote-dispatcher-14] [akka.tcp://test@iid.clear2pay.com:2551/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Ftest%40iid.clear2pay.com%3A2552-1/endpointWriter/endpointReader-akka.tcp%3A%2F%2Ftest%40iid.clear2pay.com%3A2552-0] Serializer not defined for message with serializer id [3] and manifest []. Transient association error (association remains live). No configured serialization-bindings for class [com.typesafe.config.Config]

Are we doing something wrong here or is this an Akka problem?

thanks,

Bert

PS: I tried upgrading to 2.5.13 but that didn’t help.

Here’s a piece of test code

// Akka 2.5 version
public static void main(String[] args) {
ActorSystem system = ClusterSetup.create(ConfigFactory.load(“test.conf”));
Address other = Address.apply(“akka.tcp”, “test”, Option.apply(“localhost”), Option.apply(2551));
Cluster.get(system).registerOnMemberUp(() -> {
System.out.println(“I’m member of the cluster”);
Props supervisorProps = Props.create(TestActor.class, “Hello”)
.withDeploy(new Deploy(new RemoteScope(other)));

        system.actorOf(supervisorProps, "test");
        System.out.println("Remote actor created");
    });
    Cluster.get(system).join(other);
}

public static class TestActor extends AbstractLoggingActor {
    public TestActor(String msg) {
        System.out.println("I am here!!!");
    }

    @Override
    public Receive createReceive() {
        return receiveBuilder().matchAny(System.out::println).build();
    }
}

// Akka 2.4 version
public static void main(String[] args) {
ActorSystem system = ClusterSetup.create(ConfigFactory.load());
Cluster.get(system).registerOnMemberUp(() -> {
System.out.println(“I’m member of the cluster”);
});
Cluster.get(system).join(system.provider().getDefaultAddress());
}

public static class TestActor extends AbstractLoggingActor {
	public TestActor(String msg) {
		System.out.println("I am here!!! " + msg);
		receive(ReceiveBuilder.create().matchAny(System.out::println).build());
	}
}

I think this could be related to additional-serialization-bindings, see migration guide

Thanks Patrik for the quick reply. I think this is indeed related to the additional-serialization-bindings.

However, in both old and new version we have set akka.actor.enable-additional-serialization-bindings = on

With some further digging I found out that if we add the following config to the new version it works again.

akka {
actor {
additional-serialization-bindings {
“com.typesafe.config.impl.SimpleConfig” : “java”
“akka.remote.RemoteScope” : “java”
}
}
}

For us it is more than an order of magnitude simpler to change the new version than to create a patch release for the old version. So my current line of thinking is to add this config to the new version to make it work with the old. Then in the next version we’ll remove these two lines. I did a small test and that seems to work.

Does this make sense?

Ah, those binding might have even been added after 2.5.0. Define those in your new version:

  "com.typesafe.config.impl.SimpleConfig" = java
  "com.typesafe.config.Config" = java
  "akka.remote.RemoteScope" = java

When all nodes are on the new version you can do another roll and remove that config again.