Search code examples
playframeworkplayframework-2.0akkaakka-monitoringkamon

Node fails when it tries to join cluster


I've frontend and backend server.

Frontend runs Play! 2.5 and akka 2.4.11 Backend runs akka 2.4.11

Both running kamon 0.6.3, and has the following dependencies:

"io.kamon" %% "kamon-akka" % Version.kamon,
"io.kamon" %% "kamon-log-reporter" % Version.kamon,
"io.kamon" %% "kamon-system-metrics" % Version.kamon,
"io.kamon" %% "kamon-core" % Version.kamon,
"io.kamon" %% "kamon-akka-remote" % Version.kamon,
"io.kamon" %% "kamon-statsd" % Version.kamon,
"io.kamon" % "kamon-play-25_2.11" % Version.kamon

In build.sbt I have the following:

aspectjSettings
javaOptions <++= AspectjKeys.weaverOptions in Aspectj
fork in run := true

I'm starting backend with the aspectj weaver:

-javaagent:./aspectjweaver/aspectjweaver-1.8.9.jar

In plugins.sbt I added the folllowing plugin:

addSbtPlugin("io.kamon" % "aspectj-play-runner" % "0.1.3")

However when I start backend and frontend, I'm getting the following exception on backend, immidiately as my frontend node joins backend cluster.

java.lang.NoSuchFieldError: PARSER
    at akka.remote.instrumentation.TraceContextAwareWireFormats$TraceContextAwareRemoteEnvelope.<init>(TraceContextAwareWireFormats.java:859)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$TraceContextAwareRemoteEnvelope.<init>(TraceContextAwareWireFormats.java:806)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$TraceContextAwareRemoteEnvelope$1.parsePartialFrom(TraceContextAwareWireFormats.java:941)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$TraceContextAwareRemoteEnvelope$1.parsePartialFrom(TraceContextAwareWireFormats.java:936)
    at com.google.protobuf.CodedInputStream.readMessage(CodedInputStream.java:309)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$AckAndTraceContextAwareEnvelopeContainer.<init>(TraceContextAwareWireFormats.java:111)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$AckAndTraceContextAwareEnvelopeContainer.<init>(TraceContextAwareWireFormats.java:45)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$AckAndTraceContextAwareEnvelopeContainer$1.parsePartialFrom(TraceContextAwareWireFormats.java:149)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$AckAndTraceContextAwareEnvelopeContainer$1.parsePartialFrom(TraceContextAwareWireFormats.java:144)
    at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:141)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:176)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:188)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:193)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
    at akka.remote.instrumentation.TraceContextAwareWireFormats$AckAndTraceContextAwareEnvelopeContainer.parseFrom(TraceContextAwareWireFormats.java:279)
    at akka.kamon.instrumentation.RemotingInstrumentation.aroundDecodeRemoteMessage(RemotingInstrumentation.scala:82)
    at akka.remote.transport.AkkaPduProtobufCodec$.decodeMessage(AkkaPduCodec.scala:187)
    at akka.remote.EndpointReader.akka$remote$EndpointReader$$tryDecodeMessageAndAck(Endpoint.scala:1043)
    at akka.remote.EndpointReader$$anonfun$receive$2.applyOrElse(Endpoint.scala:974)
    at akka.actor.Actor$class.aroundReceive(Actor.scala:484)
    at akka.remote.EndpointActor.aroundReceive(Endpoint.scala:449)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
    at akka.actor.ActorCell.invoke_aroundBody0(ActorCell.scala:495)
    at akka.actor.ActorCell$AjcClosure1.run(ActorCell.scala:1)
    at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
    at akka.kamon.instrumentation.ActorMonitors$$anon$1$$anonfun$processMessage$1.apply(ActorMonitor.scala:59)
    at kamon.trace.Tracer$.withContext(TracerModule.scala:58)
    at akka.kamon.instrumentation.ActorMonitors$$anon$1.processMessage(ActorMonitor.scala:58)
    at akka.kamon.instrumentation.ActorCellInstrumentation.aroundBehaviourInvoke(ActorInstrumentation.scala:44)
    at akka.actor.ActorCell.invoke(ActorCell.scala:488)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
    at akka.dispatch.Mailbox.run(Mailbox.scala:224)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Can you please help?


Solution

  • The answer w simple. Should use

    "io.kamon" % "kamon-akka-remote_akka-2.4_2.11" % "0.6.3"
    

    instead.