shey
shey

Reputation: 344

(on using Jmeter backend listener)- Uncaught Exception java.lang.IllegalStateException: Failed calling setupTest

Im using https://grafana.com/dashboards/1152 plugin for sending Jmeter metrix to InfluxDB.

When i run in my local system(windows-GUI or NON GUI)i am able to send the metrics.

Where as when i run from a linux machine im getting this error

 sh DummyTest.sh
current dir is /home/jmeter
=== START OF  run-load-test.sh SCRIPT ===
Creating summariser <summary>
Created the tree successfully using /user/jmeter/DummyTest/TrialScript.jmx

Starting the test @ Mon Jun 03 14:11:46 BST 2019 (1559567506444)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
Uncaught Exception java.lang.IllegalStateException: Failed calling setupTest. See log file for details.

Sh file contains -

#! /bin/sh
JMETER_HOME=/user/jmeter/DummyTest/apachejmeter4
#PATH=$PATH:JMETER_HOME/bin
#export PATH
echo $PATH
cd $1
echo current dir is `pwd`
echo "=== START OF  run-load-test.sh SCRIPT ==="
$JMETER_HOME/bin/jmeter.sh -n -t /user/jmeter/DummyTest/TrialScript.jmx

My backend listener is -

testName    Test
nodeName    Test-Node
influxDBHost    121.121.121.98
influxDBPort    8086
influxDBUser    jmeter
influxDBPassword    
influxDBDatabase    Fnd
retentionPolicy autogen
samplersList    .*
useRegexForSamplerList  true

I have installed new jmeter 4 with only required plugins.Still im getting this error.

Please can anyone guide me

Log message:

2019-06-04 09:09:31,145 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient and queue capacity: 5000
2019-06-04 09:09:31,146 INFO o.a.j.v.b.BackendListener: Backend Listener: Started  worker with class: class rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient
2019-06-04 09:09:41,333 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.IllegalStateException: Failed calling setupTest
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:339) ~[ApacheJMeter_components.jar:4.0 r1823414]
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:292) ~[ApacheJMeter_components.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:215) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:384) ~[ApacheJMeter_core.jar:4.0 r1823414]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: connect timed out
    at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-19.0.0.jar:?]
    at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:270) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at org.influxdb.impl.InfluxDBImpl.describeDatabases(InfluxDBImpl.java:246) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.createDatabaseIfNotExistent(JMeterInfluxDBBackendListenerClient.java:249) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupInfluxClient(JMeterInfluxDBBackendListenerClient.java:207) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupTest(JMeterInfluxDBBackendListenerClient.java:142) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:337) ~[ApacheJMeter_components.jar:4.0 r1823414]
    ... 4 more
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_60]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_60]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_60]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_60]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_60]
    at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_60]
    at okhttp3.internal.platform.Platform.connectSocket(Platform.java:129) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:160) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
    at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:145) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[okhttp-3.10.0.jar:?]
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[okhttp-3.10.0.jar:?]
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) ~[okhttp-3.10.0.jar:?]
    at okhttp3.RealCall.execute(RealCall.java:77) ~[okhttp-3.10.0.jar:?]
    at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:261) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at org.influxdb.impl.InfluxDBImpl.describeDatabases(InfluxDBImpl.java:246) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.createDatabaseIfNotExistent(JMeterInfluxDBBackendListenerClient.java:249) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupInfluxClient(JMeterInfluxDBBackendListenerClient.java:207) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupTest(JMeterInfluxDBBackendListenerClient.java:142) ~[JMeter-InfluxDB-Writer-plugin-1.2.jar:1.2]
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:337) ~[ApacheJMeter_components.jar:4.0 r1823414]
    ... 4 more

Upvotes: 1

Views: 2477

Answers (1)

Chethan
Chethan

Reputation: 26

Do you have the below plugin or add-in installed ? if not please install - Point#1 plug in name - jmeter.backendlistener.elasticsearch-2.6.9.jar

Drop the above jar file in the path - apache-jmeter-5.2.1\lib\ext
(jmeter vesrion may vary depending on what you have installed)

Point#2 Then open the script and in Backend Listener, under Backend Listener Implementation choose the option io.github.delirius325.backendlisterner.elasticsearch.ElasticsearchBackendClient

Save the script > Run the script

It would not throw the above error mentioned.

Upvotes: 0

Related Questions