Pinpoint: RabbitMQConsumeInterceptor NullPointerException

Created on 10 Feb 2018  路  7Comments  路  Source: pinpoint-apm/pinpoint

Description

RabbitMQConsumeInterceptor cause NullPointerException

  • [ WARN ] (.p.p.r.i.RabbitMQConsumeInterceptor) BEFORE. Caused:null
    java.lang.NullPointerException
    at com.navercorp.pinpoint.plugin.rabbitmq.interceptor.RabbitMQConsumeInterceptor.createTrace(RabbitMQConsumeInterceptor.java:46)
    at com.navercorp.pinpoint.bootstrap.interceptor.SpanSimpleAroundInterceptor.before(SpanSimpleAroundInterceptor.java:51)

Environment

  • Pinpoint version: 1.7.2-SNAPSHOT
  • OS, WAS, affected library, etc: WAS
  • Additional details (e.g. how your collector/web is set up):
bug plugin

Most helpful comment

@geekMessi @Xylus Yes, it seems hdeader is null. Since I am in vacation for China spring about a week I will fix this issue a little later. While since header is null, the message sender was not run with pinpoint agent, the this bug will just cause the lost of trace in consumer side, but will not affect the consumer to handle the message correctly. So in most case this exception is harmless.

All 7 comments

Hi @geekMessi
Looks like AMQP.BasicProperties can be null for empty headers.
(ping @jiaqifeng)

@geekMessi @Xylus Yes, it seems hdeader is null. Since I am in vacation for China spring about a week I will fix this issue a little later. While since header is null, the message sender was not run with pinpoint agent, the this bug will just cause the lost of trace in consumer side, but will not affect the consumer to handle the message correctly. So in most case this exception is harmless.

@jiaqifeng Perfect, thanks :)

@geekMessi @Xylus
PR #3878 submitted. While I could just reproduce the case that headers is null but could not reproduce the AMQP.BasicProperties is null, so I add null check for them all.

@jiaqifeng Thanks. Providing a safeguard for both cases looks like a good solution.

@jiaqifeng
Wonderful! This will work better.

resolved via #3878

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geniuszhe picture geniuszhe  路  3Comments

yanpeng-ali picture yanpeng-ali  路  3Comments

balotelli1011 picture balotelli1011  路  4Comments

majinkai picture majinkai  路  6Comments

ing-arriola picture ing-arriola  路  4Comments