mderevyankoaqa / jmeter-influxdb2-listener-plugin

Influx DB v2.0 listener plugin for Apache JMeter. Provides the possibility to see the online dashboard (aggregation table, errors, the response body of failures).
Apache License 2.0
112 stars 39 forks source link

Help required with the plugin and BlazeMeter - okHttp conflict error #66

Open roddasrinivas opened 1 year ago

roddasrinivas commented 1 year ago

I need help with below error. Issue is occurring when I am trying to to execute the test in BlazeMeter. Error is occurring only when JSR223 is used for scripting. Without JSR223, it is successfully writing data to influx dB.

Version: JMeter 5.5 Java 11

2022-09-14 01:19:55,217 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,5,main] java.lang.NoSuchMethodError: 'okhttp3.HttpUrl okhttp3.HttpUrl.get(java.lang.String)' at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:108) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:79) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at com.influxdb.client.internal.InfluxDBClientImpl.(InfluxDBClientImpl.java:98) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:261) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:180) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at io.github.mderevyankoaqa.influxdb2.visualizer.influxdb.client.InfluxDatabaseClient.setupInfluxClient(InfluxDatabaseClient.java:148) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at io.github.mderevyankoaqa.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupInfluxClient(InfluxDatabaseBackendListenerClient.java:257) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at io.github.mderevyankoaqa.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupTest(InfluxDatabaseBackendListenerClient.java:178) ~[jmeter-plugins-influxdb2-listener-2.4.jar:2.4] at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:325) ~[ApacheJMeter_components.jar:5.5] at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:280) ~[ApacheJMeter_components.jar:5.5] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:218) ~[ApacheJMeter_core.jar:5.5] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:396) ~[ApacheJMeter_core.jar:5.5] at java.lang.Thread.run(Thread.java:829) ~[?:?]

Possible root cause is conflicting okHttp versions:

DEBUG Engine.s3downloader] objects for download: [s3.ObjectSummary(bucket_name='blazemeter-gcp', key='masters/64396587/tests/11513296/Notes_Spectre.jmx'), s3.ObjectSummary(bucket_name='blazemeter-gcp', key='masters/64396587/tests/11513296/jmeter-plugins-influxdb2-listener-2.4.jar'), s3.ObjectSummary(bucket_name='blazemeter-gcp', key='masters/64396587/tests/11513296/okhttp-4.10.0.jar')]

2022-09-14 01:19:28,392 INFO o.j.r.JARSourceHTTP: Downloading: https://search.maven.org/remotecontent?filepath=com/squareup/okhttp3/okhttp/3.10.0/okhttp-3.10.0.jar
2022-09-14 01:19:28,392 INFO o.j.r.PluginManagerCMD: Downloading okhttp...
mderevyankoaqa commented 1 year ago

Hi @roddasrinivas, wow will take a look. Have you reproduced this on the local PC?

BR, Mike

roddasrinivas commented 1 year ago

Hello Mike,

Problem is on Blazemeter only. In Blazemeter also, problem come only if we use JSR223 in JMeter. On local PC it is working fine. Is it possible to change okHttp jar version on plug-in? so there won't be any conflict between okHttp versions.

Best Regards, Srinivas

mderevyankoaqa commented 1 year ago

The problem - I do not see any issues on local PC, or any warnings with that. We have okHttp as part of the 'influxdb-client-java' used to push data to InfluxDB. Its Java world :)))

image

As you can see we have no okHttp as part of dependencies.

On some installations, we had a problem like you posted https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/issues/16 (the solution was described in the ticket).

I'm happy to help but I got stuck with that, I have no env. to reproduce this.

BR, Mike