Summary: | backend listener rootmetricsprefix does not take system property value when running in slave (distributed) mode | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | jz5168 |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux |
Description
jz5168
2016-09-14 17:19:01 UTC
(In reply to jz5168 from comment #0) > For backend listener rootmetricsprefix, we need to parameterize the value > for it. We have tried using system property and use ${__P(abc)}. Did you use -G instead of -J to send property from Controller. Or -J if different per jmeter-server ? This > works when running jmeter in single mode (master only), however, when > running in distributed mode, even if we have confirmed system property (abc > in this example) is set in the slave nodes, the backend listener sends > nothing to the backend InfluxDB. > > This needs to be fixed ASAP. For master, I use -J to specify system property and it works. For slave, I use Java system property directly using -D, see below: nohup ${JAVA_HOME}/bin/java -server -Xms512m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000 -jar apache-jmeter-3.0/bin/ApacheJMeter.jar -Dserver_port=1099 -Dabc=somevalue ... This technique works for other elements of test plan, but not backend listener rootmetricsprefix of slave nodes. The jmeter slave log file indicated the system property is set: ... INFO - jmeter.JMeter: Setting System property: abc=ABC ... (In reply to jz5168 from comment #2) > For master, I use -J to specify system property and it works. > > For slave, I use Java system property directly using -D, see below: > > nohup ${JAVA_HOME}/bin/java -server -Xms512m -Xmx1024m > -Dsun.rmi.dgc.client.gcInterval=600000 > -Dsun.rmi.dgc.server.gcInterval=600000 -jar > apache-jmeter-3.0/bin/ApacheJMeter.jar -Dserver_port=1099 -Dabc=somevalue ... > > This technique works for other elements of test plan, but not backend > listener rootmetricsprefix of slave nodes. No -D does not work with __P __P uses properties either set with -J (local) or -G(global). Global properties are usually sent from controller to servers. Closing bug as INVALID. Please use mailing list for this. Regards Makes sense. That's why -J is working for me. Thanks. Hi, I am using JMeter (Version 3.2 r1790748) and I suffer the same issue with the backendListener not substituting variables with the property define in the test plan. How I run test: * 1x JMeter server instance (/jmeter/bin/jmeter-server -Dserver.rmi.localport=50000 -Dserver_port=1099) * 1x JMeter Client (/jmeter/bin/jmeter -n -t /test-plan/testplan.jmx -Rjmeter-server-0.jmeter-server:1099 -G/test-profile/sanity-check.properties) The properties are sent over from the client to the server as per the following LOG entry: From Client log: 2017-04-24 12:37:14,537 INFO o.a.j.e.ClientJMeterEngine: Sending properties {us2.influxdb.host=10.21.xx.xx} From Server log 2017-04-24 12:37:14,540 INFO o.a.j.e.StandardJMeterEngine: Applying properties {us2.influxdb.host=10.21.xx.xx} Even if the properties are copied over and applied, the BackendListener is still trying to connect using the variable placeholder and not the given value Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: http://${influxdb_host}:8086/ at java.net.URI$Parser.fail(URI.java:2848) ~[?:1.8.0_112] at java.net.URI$Parser.parseAuthority(URI.java:3186) ~[?:1.8.0_112] at java.net.URI$Parser.parseHierarchical(URI.java:3097) ~[?:1.8.0_112] at java.net.URI$Parser.parse(URI.java:3053) ~[?:1.8.0_112] at java.net.URI.<init>(URI.java:588) ~[?:1.8.0_112] at okhttp3.HttpUrl.uri(HttpUrl.java:374) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.connection.RouteSelector.resetNextProxy(RouteSelector.java:117) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.connection.RouteSelector.<init>(RouteSelector.java:59) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.connection.StreamAllocation.<init>(StreamAllocation.java:88) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:111) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:145) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at okhttp3.RealCall.execute(RealCall.java:60) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:261) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at org.influxdb.impl.InfluxDBImpl.describeDatabases(InfluxDBImpl.java:246) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.createDatabaseIfNotExistent(JMeterInfluxDBBackendListenerClient.java:222) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupInfluxClient(JMeterInfluxDBBackendListenerClient.java:181) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupTest(JMeterInfluxDBBackendListenerClient.java:122) ~[JMeter-InfluxDB-Writer-plugin-1.1.jar:1.1] at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(BackendListener.java:349) ~[ApacheJMeter_components.jar:3.2 r1790748] at org.apache.jmeter.samplers.RemoteSampleListenerImpl.testStarted(RemoteSampleListenerImpl.java:66) ~[ApacheJMeter_core.jar:3.2 r1790748] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) ~[?:1.8.0_112] at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:1.8.0_112] at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:1.8.0_112] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_112] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:1.8.0_112] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) ~[?:1.8.0_112] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) ~[?:1.8.0_112] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) ~[?:1.8.0_112] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_112] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) ~[?:1.8.0_112] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_112] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_112] Any idea why variables are not substitute properly when running in distributed mode only? Thanks /Antoine The backend listener work on the server side ( not on node side ) and variable are only replace on JMeter node - which execute the test plan I have a patch to fix this (only with user defined variables) but it's for next release of JMeter. *** This bug has been marked as a duplicate of bug 57962 *** This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4112 |