在jaeger使用过程中遇到了一个奇怪的问题,本来jaeger运行的好好的,jaeger配置与依赖都没动,就上了一个版本,结果jaeger就没上报监控数据了,由于生产上没打印info日志,后面在本地试着重现,查看到报下面错误
Exception in thread "jaeger.RemoteReporter-QueueProcessor"
java.lang.NoSuchMethodError: io.jaegertracing.agent.thrift.Agent$Client.sendBaseOneway
(Ljava/lang/String;Lorg/apache/thrift/TBase;)V
at io.jaegertracing.agent.thrift.Agent$Client.send_emitBatch(Agent.java:70)
at io.jaegertracing.agent.thrift.Agent$Client.emitBatch(Agent.java:63)
at io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:64)
at io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:110)
at io.jaegertracing.internal.reporters.RemoteReporter$FlushCommand.execute(RemoteReporter.java:154)
at io.jaegertracing.internal.reporters.RemoteReporter$QueueProcessor.run(RemoteReporter.java:173)
at java.lang.Thread.run(Thread.java:745)
点击进去是下面的jar
经过排查原来是jar冲突导致,发布的版本中包含了
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>1.1.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
解决方案去除冲突依赖:
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>1.1.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</exclusion>
</exclusions>
</dependency>
重新发布后,监控数据上报成功。