Open dipakkumar1225 opened 3 years ago
I am also facing the same issue.
2021-05-14 00:18:27,096 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.lacework.jmeter.InfluxDatabaseBackendListenerClient and queue capacity: 5000
2021-05-14 00:18:27,097 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.lacework.jmeter.InfluxDatabaseBackendListenerClient
2021-05-14 00:18:27,113 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,6,main]
java.lang.NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl;
at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[Jmeter-InfluxDB-Writer-Latest-1.0-jar-with-dependencies.jar:?]
at com.influxdb.client.internal.AbstractInfluxDBClient.
The root cause for this error is. - influxdb-client uses okhttp version 4.7.2 -- By default jmeter has 3.10.0 in the lib folder. when we put this plugin in the ext and try to run the jmeter, it is pointing it to the 3.10.0 jar which has no such method and throwing the exception. So need to see how we can force the plugin to use only the 4.7.2 version in the Jmeter which is part of it.
Hi @dipakkumar1225 , @nishantkavuru please try to remove other listeners you have in the lib folder, it can be the issue in the Java runtime. Please leave only influxdb2 listener.
BR, Mike
@mderevyankoaqa
I don't have any other listeners. As i mentioned earlier this is the cause,
The root cause for this error is. - influxdb-client uses okhttp version 4.7.2 -- By default jmeter has 3.10.0 in the lib folder. when we put this plugin in the ext and try to run the jmeter, it is pointing it to the 3.10.0 jar which has no such method and throwing the exception. So need to see how we can force the plugin to use only the 4.7.2 version in the Jmeter which is part of it.
@nishantkavuru, got you.. need to take a look thanks.. but do not understand why it's working for me and others for the similar infrastructure.
BR, Mike
@dipakkumar1225
The example of one of the env. which is working fine. Have a lot of work, need to spare time for the investigation.
C:\apache-jmeter-5.4.1\apache-jmeter-5.4.1\lib>dir Volume in drive C has no label. Volume Serial Number is D693-047F
Directory of C:\apache-jmeter-5.4.1\apache-jmeter-5.4.1\lib
02/17/2021 04:06 PM
BR, Mike
It works with com.squareup.okhttp3:okhttp:3.12.13
- name: Install okhttp
get_url:
url: https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/3.12.13/okhttp-3.12.13.jar
dest: "{{ JMETER_HOME }}/lib/okhttp-3.12.13.jar"
mode: '0644'
I just say that I faced with this issue with fresh Linux installation 5.4.1. The issue was resolved with this fix. I want to say thx for your repo and you time and good tool!
I am having the same problem..
I also put the following jars in the lib directly:
Saxon-HE-9.9.1-8.jar
accessors-smart-1.2.jar
annotations-13.0.jar
apiguardian-api-1.1.0.jar
converter-gson-2.9.0.jar
converter-scalars-2.9.0.jar
gson-2.8.6.jar
gson-fire-1.8.4.jar
influxdb-client-core-3.2.0.jar
influxdb-client-java-3.2.0.jar
jsr305-3.0.2.jar
kotlin-stdlib-1.3.71.jar
kotlin-stdlib-common-1.3.71.jar
logging-interceptor-4.7.2.jar
okhttp-4.7.2.jar
okio-jvm-2.6.0.jar
retrofit-2.9.0.jar
rxjava-2.2.19.jar
swagger-annotations-1.6.1.jar
Hi @dipakkumar1225 ,
Can you try this build https://drive.google.com/file/d/1yRXvzYpMSBsZt6nW1x6sq3YPV0vYpClr/view?usp=sharing
and let me know the result, since I have no infrastructure to test.. I have no issues on my Windows 10, and Centos.
BR, Mike
@mderevyankoaqa I have same result with version from this link: https://drive.google.com/file/d/1yRXvzYpMSBsZt6nW1x6sq3YPV0vYpClr/view?usp=sharing and with okhttp-3.12.13.jar. OS: ubuntu focal.
java.lang.NoSuchMethodError: 'okhttp3.MediaType okhttp3.MediaType.get(java.lang.String)' at retrofit2.converter.scalars.ScalarRequestBodyConverter.<clinit>(ScalarRequestBodyConverter.java:25) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at retrofit2.converter.scalars.ScalarsConverterFactory.requestBodyConverter(ScalarsConverterFactory.java:69) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at retrofit2.Retrofit.nextRequestBodyConverter(Retrofit.java:277) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit.requestBodyConverter(Retrofit.java:258) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.parseParameterAnnotation(ServiceMethod.java:678) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.parseParameter(ServiceMethod.java:333) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:202) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:166) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at retrofit2.Retrofit$1.invoke(Retrofit.java:145) ~[JMeter-InfluxDB-Writer-plugin-1.3.0.jar:1.3.0] at com.sun.proxy.$Proxy29.postWrite(Unknown Source) ~[?:?] at com.influxdb.client.internal.AbstractWriteBlockingClient.write(AbstractWriteBlockingClient.java:81) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.WriteApiBlockingImpl.lambda$writePoints$1(WriteApiBlockingImpl.java:137) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[?:?] at com.influxdb.client.internal.WriteApiBlockingImpl.writePoints(WriteApiBlockingImpl.java:137) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.WriteApiBlockingImpl.writePoints(WriteApiBlockingImpl.java:121) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.influxdb.client.InfluxDatabaseClient.importData(InfluxDatabaseClient.java:115) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient$1.run(InfluxDatabaseBackendListenerClient.java:312) ~[jmeter-plugin-influxdb2-listener-1.4-all.jar:task ':jar' property 'archiveVersion'] at java.util.TimerThread.mainLoop(Timer.java:556) ~[?:?] at java.util.TimerThread.run(Timer.java:506) ~[?:?]
I resolved it with fresh jmeter install and with https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/3.12.13/okhttp-3.12.13.jar file in lib directory.
@mu-samoylov, got you, thanks.
Can you please share what software you had:
For example, I have been working with CentOS and red hat (no UI) - haven't faced ..
BR, Mike
OS: Windows 10 Enterprise Installed Java : 14 JMeter version: 5.4.1 InfluxDB version: 2.0.6 Grafana : grafana-7.5.5
2021-05-12 05:14:01,320 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2021-05-12 05:14:01,321 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2021-05-12 05:14:01,322 INFO o.a.j.s.SampleEvent: List of sample_variables: [] 2021-05-12 05:14:01,323 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.' 2021-05-12 05:14:01,323 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.' 2021-05-12 05:14:01,958 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient and queue capacity: 5000 2021-05-12 05:14:01,960 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient 2021-05-12 05:14:01,985 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,6,main] java.lang.NoSuchMethodError: 'okhttp3.HttpUrl okhttp3.HttpUrl.get(java.lang.String)' at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:506) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion'] at com.influxdb.client.internal.AbstractInfluxDBClient.(AbstractInfluxDBClient.java:96) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at com.influxdb.client.internal.InfluxDBClientImpl.(InfluxDBClientImpl.java:96) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:204) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at com.influxdb.client.InfluxDBClientFactory.create(InfluxDBClientFactory.java:159) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at org.md.jmeter.influxdb2.visualizer.influxdb.client.InfluxDatabaseClient.setupInfluxClient(InfluxDatabaseClient.java:39) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupInfluxClient(InfluxDatabaseBackendListenerClient.java:233) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at org.md.jmeter.influxdb2.visualizer.InfluxDatabaseBackendListenerClient.setupTest(InfluxDatabaseBackendListenerClient.java:165) ~[jmeter-plugin-influxdb2-listener-1.1.jar:task ':jar' property 'archiveVersion']
at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:325) ~[ApacheJMeter_components.jar:5.4.1]
at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:280) ~[ApacheJMeter_components.jar:5.4.1]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:205) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:382) ~[ApacheJMeter_core.jar:5.4.1]
at java.lang.Thread.run(Thread.java:832) [?:?]