Bug 63906 - NPE for InfluxDB backend listener during failover testing
Summary: NPE for InfluxDB backend listener during failover testing
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.1.1
Hardware: All All
: P2 normal (vote)
Target Milestone: JMETER_5.2.1
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-06 07:53 UTC by sergiy.iampol
Modified: 2019-11-11 18:00 UTC (History)
2 users (show)



Attachments
test plan view (28.27 KB, text/html)
2019-11-06 07:53 UTC, sergiy.iampol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sergiy.iampol 2019-11-06 07:53:48 UTC
Created attachment 36873 [details]
test plan view

BL works fine most of the time. However I had to run specific kind of test - failover, where I test how does start/stop/restart/deploy etc are going on the backend side. This obviously results in some outage and there are lots of errors and delays during such actions.
As I said such behavior is expected but during one such restart I got following exception on all my load injectors:
*******************
    2019-11-06 06:52:41,928 ERROR o.a.j.JMeter: Uncaught exception:
java.lang.NullPointerException: null
            at org.apache.jmeter.visualizers.backend.ErrorMetric.getResponseMessage(ErrorMetric.java:71) ~[ApacheJMeter_components.jar:r1859277]
            at org.apache.jmeter.visualizers.backend.ErrorMetric.hashCode(ErrorMetric.java:92) ~[ApacheJMeter_components.jar:r1859277]
            at java.util.HashMap.hash(HashMap.java:339) ~[?:1.8.0_222]
            at java.util.HashMap.getOrDefault(HashMap.java:1057) ~[?:1.8.0_222]
            at org.apache.jmeter.visualizers.backend.SamplerMetric.add(SamplerMetric.java:98) ~[ApacheJMeter_components.jar:r1859277]
            at org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient.handleSampleResults(InfluxdbBackendListenerClient.java:307) ~[ApacheJMeter_components.jar:r1859277]
            at org.apache.jmeter.visualizers.backend.BackendListener.sendToListener(BackendListener.java:267) ~[ApacheJMeter_components.jar:r1859277]
            at org.apache.jmeter.visualizers.backend.BackendListener$Worker.run(BackendListener.java:239) ~[ApacheJMeter_components.jar:r1859277] 
*******************

The main problem is that whole test stack after that exception. Meaning no more load were produced.
Comment 1 Philippe Mouawad 2019-11-11 18:00:45 UTC
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new d763e53  ErrorMetric: test for nullity of responseMessage as it may be null
d763e53 is described below

commit d763e53d5c230502b65addb96b758460c8126280
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Mon Nov 11 19:01:08 2019 +0100

    ErrorMetric: test for nullity of responseMessage as it may be null

    This resolves Bug 63906 - NPE for InfluxDB backend listener during
    failover testing
---
 .../main/java/org/apache/jmeter/visualizers/backend/ErrorMetric.java    | 2 +-
 src/core/src/main/java/org/apache/jmeter/samplers/SampleResult.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)