0

I have a message that I am sending via Cluster in Akka. I have two backend nodes and one frontend node. The backend nodes come up fine, but the frontend node is not coming up (association failed).

I feel I have a hint as to why this is: I have a working configuration (frontend comes up and sends and receives messages fine), but the frontend, backend, and common messages are all in the same package. When I move split these into separate subprojects (common, frontend, and backend), the code breaks. Is there an obvious reason as to why this is? Also, stacktrace:

[INFO] [10/08/2014 17:00:32.385] [ClusterSystem-akka.actor.default-dispatcher-14] [Cluster(akka://ClusterSystem)] Cluster Node [akka.tcp://ClusterSystem@192.168.1.2:62701] - Welcome from [akka.tcp://ClusterSystem@192.168.1.7:2552]
[INFO] [10/08/2014 17:00:32.425] [ClusterSystem-akka.actor.default-dispatcher-14] [akka://ClusterSystem/system/cluster/core/daemon/joinSeedNodeProcess-1] Message [akka.cluster.InternalClusterAction$InitJoinAck] from Actor[akka.tcp://ClusterSystem@192.168.1.7:2551/system/cluster/core/daemon#1100391461] to Actor[akka://ClusterSystem/system/cluster/core/daemon/joinSeedNodeProcess-1#217838192] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[WARN] [10/08/2014 17:00:33.281] [ClusterSystem-akka.remote.default-remote-dispatcher-6] [akka.tcp://ClusterSystem@192.168.1.2:62701/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40192.168.1.7%3A2551-0] Association with remote system [akka.tcp://ClusterSystem@192.168.1.7:2551] has failed, address is now gated for [5000] ms. Reason is: [sample.cluster.transformation.BackendRegistration$].

I feel there must be an obvious reason for this. My Build.scala file has the dependencies and I import the classes/objects I need, but does having these in separate subprojects affect anything?

Michael Dotson
  • 519
  • 3
  • 7
  • If you split the project into sub-projects then they don't have access to each other classes unless you use `dependsOn` in your sbt configuration file, [here](http://www.scala-sbt.org/0.12.2/docs/Getting-Started/Multi-Project.html) you can find the documentation. – Ende Neu Oct 08 '14 at 22:19
  • I do have dependsOn (I don't think it would compile without it). Everything compiles fine, it just doesn't come up properly when running the frontend. Backend comes up fine. – Michael Dotson Oct 08 '14 at 22:27

1 Answers1

1

And I figured it out...

It seems that my remote system had the old configuration where the messages were in the same package, while the frontend had the configuration with the subprojects (the common package in a subproject). It seems that the serialization does care about this, even if the case objects and case classes have the same signature, but different packages on the frontend and backend.

Michael Dotson
  • 519
  • 3
  • 7