微服务全链路跟踪:jaeger坑之NoSuchMethodError: io.jaegertracing.agent.thrift.Agent$Client.sendBaseOneway

在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>

重新发布后,监控数据上报成功。

posted @ 2020-03-31 11:22  lipengxs  阅读(28)  评论(0)    收藏  举报