0

我有前端和后端服务器。

前端运行 Play!2.5 和 akka 2.4.11 后端运行 akka 2.4.11

两者都运行 kamon 0.6.3,并具有以下依赖项:

"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

在 build.sbt 我有以下内容:

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

我从 aspectj weaver 开始后端:

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

在 plugins.sbt 我添加了以下插件:

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

但是,当我启动后端和前端时,当我的前端节点加入后端集群时,我立即在后端收到以下异常。

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)

你能帮忙吗?

4

1 回答 1

0

答案很简单。应该使用

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

反而。

于 2016-10-24T19:43:14.660 回答