微服務全鏈路跟蹤: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>

重新發布後,監控數據上報成功。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章