I am testing an API using JMeter which works fine locally. However, when I upload my test plan and parameters file to Blazemeter, it doesn't run well and throws error
javax.script.ScriptException: ReferenceError: "getFinancialDashboard_responseCode" is not defined in at line number 1
in logs. getFinancialDashboard_responseCode is a property I have defined in previous thread group and its value is being passed to teardown thread group to push notifications to a messaging app based on response code.
I have tried to define this property in test configurations on Blazemeter but that serves a different purpose i.e. Overrides the value. Defining this property in configurations on Blazemeter makes the test execute successfully but overrides the current value set in thread group and making it to send undesired notifications.
Here is the full exception log:
2018-05-19 10:46:02,874 ERROR o.a.j.c.IfController: If_getIspDashboardData_Fails: error while processing [getFinancialDashboard_responseCode != 200;]
javax.script.ScriptException: ReferenceError: "getFinancialDashboard_responseCode" is not defined in <eval> at line number 1
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155) ~[nashorn.jar:?]
at org.apache.jmeter.control.IfController$NashornJsEngine.evaluate(IfController.java:124) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.IfController.evaluateCondition(IfController.java:185) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.IfController.next(IfController.java:239) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:219) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.GenericController.next(GenericController.java:173) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.LoopController.next(LoopController.java:128) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.GenericController.next(GenericController.java:173) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.control.LoopController.next(LoopController.java:128) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:87) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:248) [ApacheJMeter_core.jar:4.0 r1823414]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: jdk.nashorn.internal.runtime.ECMAException: ReferenceError: "getFinancialDashboard_responseCode" is not defined
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291) ~[nashorn.jar:?]
at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1441) ~[nashorn.jar:?]
at jdk.nashorn.internal.scripts.Script$1$\^eval\_.:program(<eval>:1) ~[?:?]
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449) ~[nashorn.jar:?]
... 15 more
How to handle properties in Blazemeter so that values can be exchanged between thread groups?
I strongly doubt your test "works fine locally" as most probably you have configured your If Controller like:
which is not correct in terms of JavaScript. If you really have getFinancialDashboard_responseCode defined somewhere you should be using the following condition:
${__groovy(!props.get('getFinancialDashboard_responseCode').equals('200'),)}
Also make sure that Interpret Condition as Variable Expression? box is checked:
More information: 6 Tips for JMeter If Controller Usage
If for any reason you would like to continue using JavaScript you will need to amend your condition to:
fetch the property using __P() function
surround the property function call and 200 with quotation marks like:
"${__P(getFinancialDashboard_responseCode,)}" != "200"
But be aware that from performance perspective JavaScript works much worse comparing to Groovy.
Also be aware that you should be able to reach out to BlazeMeter Support, it should be faster and the chance of getting a real professional response will be much higher than in the community forums.
Related
I want to do the JMeter Master Slave setup in JMeter 4.0 in Windows OS.
I have done the following change in the jmeter-server file.
RMI_HOST_DEF=-Djava.rmi.server.hostname=10.304.61.62
To launch the slave I execute the following command from the bin folder
jmeter-server
This is working in JMeter 3.1. But getting the following error in JMeter 4.0
ERROR o.a.j.JMeter: An error occurred:
java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
at
sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source) ~[?:1.8.0_181]
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source) ~[?:1.8.0_181]
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source) ~[?:1.8.0_181]
at sun.rmi.transport.LiveRef.exportObject(Unknown Source) ~[?:1.8.0_181]
at
sun.rmi.server.UnicastServerRef.exportObject(Unknown Source) ~[?:1.8.0_181]
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source) ~[?:1.8.0_181]
at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source) ~[?:1.8.0_181]
at java.rmi.server.UnicastRemoteObject.(Unknown Source) ~[?:1.8.0_181]
at
org.apache.jmeter.engine.RemoteJMeterEngineImpl.(RemoteJMeterEngineImpl.java:65) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.RemoteJMeterEngineImpl.startServer(RemoteJMeterEngineImpl.java:71) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.JMeter.start(JMeter.java:501) [ApacheJMeter_core.jar:4.0 r1823414]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source) ~[?:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181]
at org.apache.jmeter.NewDriver.main(NewDriver.java:245) [ApacheJMeter.jar:4.0 r1823414]
Caused by: java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_181]
at java.io.FileInputStream.open(Unknown Source) ~[?:1.8.0_181]
at java.io.FileInputStream.<init>(Unknown Source) ~
[?:1.8.0_181]
at java.io.FileInputStream.<init>(Unknown Source) ~[?:1.8.0_181]
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.loadStore(SSLRMIServerSocketFactory.java:148) ~
[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.rmi.SSLRMIServerSocketFactory.createServerSocket(SSLRMIServerSocketFactory.java:100) ~[ApacheJMeter_core.jar:4.0
r1823414]
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source) ~[?:1.8.0_181]
... 16 more
According to Setting Up SSL chapter of the Remote Testing JMeter User Manual entry you need to do one of the following things:
If you want to use secure communication between master and slaves you need to launch create-rmi-keystore script (it's located in "bin" folder of your JMeter installation) - it will produce the required rmi_keystore.jks file.
If you don't want to use secure communication between master and slaves you can add the next line to user.properties file
server.rmi.ssl.disable=true
JMeter restart will bre required to pick the property up
No matter of the approach you will have to implement either 1 or 2 on master and all the slaves
The above answer is based on JMeter Distributed Testing with Docker article.
I am getting below error while replaying the script.
ERROR o.a.j.r.ResultCollector: Exception occurred while initializing file output.
java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method) ~[?:1.8.0_66]
at java.io.WinNTFileSystem.canonicalize(Unknown Source) ~[?:1.8.0_66]
at java.io.File.getCanonicalPath(Unknown Source) ~[?:1.8.0_66]
at org.apache.jmeter.reporters.ResultCollector.getFileWriter(ResultCollector.java:449) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:324) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:350) [ApacheJMeter_core.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(Unknown Source) [?:1.8.0_66]
Though it is not impacting the replay. Need to understand the reason and fixes for the same. Thanks in advance!!
Try to avoid using non-ASCII characters and spaces in
java installation
JMeter installation
test script location
results file location(s)
as you might be suffering from something like JDK-4904545 : JDK tools fail to work with non-latin characters in the install path
According to JMeter Best Practices you should stick to latest JMeter version so consider upgrading to JMeter 5.0 (or to the latest version available at JMeter Downloads page). It won't fix particular your issue, however theoretically JMeter should become faster and have some new features
I have some load testing to do. My web application does not have a domaine name (only an IP adress) and uses HTTPS.
When try to top use JMeter's Script Recorder, I get the following error in my web browser:
An error occurred during a connection to 188.165.49.217:8443. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
And if I look at JMeter's log I see the following:
Problem with keystore
java.io.IOException: >> erreur keytool : java.lang.RuntimeException:
java.io.IOException: DNSName components must begin with a letter <<
Command failed, code: 1
'"C:\Program Files (x86)\Java\jre1.8.0_121\bin\keytool" -genkeypair -alias 1XX.XXX.XX.XXX -dname "cn=1XX.XXX.XX.XXX, o=JMeter Proxy (TEMPORARY TRUST ONLY)" -keyalg RSA -keystore proxyserver.jks -storepass {redacted} -keypass {redacted} -validity 7 -ext san=dns:1XX.XXX.XX.XXX'
at org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:171) ~[jorphan.jar:4.0 r1823414]
at org.apache.jorphan.exec.KeyToolUtils.generateSignedCert(KeyToolUtils.java:285) ~[jorphan.jar:4.0 r1823414]
at org.apache.jorphan.exec.KeyToolUtils.generateHostCert(KeyToolUtils.java:276) ~[jorphan.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.ProxyControl.updateKeyStore(ProxyControl.java:1563) ~[ApacheJMeter_http.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.Proxy.getSSLSocketFactory(Proxy.java:324) [ApacheJMeter_http.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.Proxy.startSSL(Proxy.java:429) [ApacheJMeter_http.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:194) [ApacheJMeter_http.jar:4.0 r1823414]
2018-04-16 17:33:24,397 WARN o.a.j.p.h.p.Proxy: [61014] Unable to negotiate SSL transaction, no keystore?
2018-04-16 17:33:24,397 ERROR o.a.j.p.h.p.Proxy: [61014] Exception when processing sample java.io.IOException: Unable to negotiate SSL transaction, no keystore?
at org.apache.jmeter.protocol.http.proxy.Proxy.startSSL(Proxy.java:446) ~[ApacheJMeter_http.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:194) [ApacheJMeter_http.jar:4.0 r1823414]
2018-04-16 17:33:24,398 WARN o.a.j.p.h.p.Proxy: [61014] Exception while writing error java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_121]
at java.net.SocketOutputStream.socketWrite(Unknown Source) ~[?:1.8.0_121]
at java.net.SocketOutputStream.write(Unknown Source) ~[?:1.8.0_121]
at java.io.DataOutputStream.writeBytes(Unknown Source) ~[?:1.8.0_121]
at org.apache.jmeter.protocol.http.proxy.Proxy.writeErrorToClient(Proxy.java:561)
[ApacheJMeter_http.jar:4.0 r1823414]
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:258) [ApacheJMeter_http.jar:4.0 r1823414]
The way I see it, the JMeterScript Recorder does not accept IP adresses for HTTPS recording, Am I right? Is there any way to around that (besides usin a domain name for my we app)?
Regards
Elie
One option would be to modify the hosts file on the server that jmeter is running on so that jmeter can resolve the domain name. You can find information on how to modify the hosts file for your operating system here.
Since version 5.1 of apache-jmeter, this problem has been resolved and you can enter IP or domain name that starts with digits.
I'm using latest JMeter 4 and trying to use basic jexl syntax of declaring local variable in jexl function
Local variables Can be defined using the var keyword; their identifying rules are the same as contextual variables.
Basic declaration: var x;
So in JMeter I tried
${__jexl2(var x;)}
and succeeded, but using ${__jexl3(var x;)} it throw an parser exception:
2018-04-25 14:18:16,451 ERROR o.a.j.f.Jexl3Function: An error occurred while evaluating the expression "var a;"
org.apache.commons.jexl3.JexlException$Parsing: #1:1 parsing error in 'var'
at org.apache.commons.jexl3.JexlEngine.createExpression(JexlEngine.java:304) ~[commons-jexl3-3.1.jar:3.1]
at org.apache.jmeter.functions.Jexl3Function.execute(Jexl3Function.java:94) [ApacheJMeter_functions.jar:4.0 r1823414]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:101) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:281) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.testelement.AbstractTestElement.getName(AbstractTestElement.java:165) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.sampler.DebugSampler.sample(DebugSampler.java:56) [ApacheJMeter_components.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) [ApacheJMeter_core.jar:4.0 r1823414]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
Is it a JMeter issue or jexl3 issue, or am I missing something?
EDIT
In addition to failure to parse var, it can't parse ;, here's a working example with jexl2 that failed with jexl3:
${__jexl3(abc=new("java.util.ArrayList"\, 1);)}
It was a bug in JMeter Jexl3 implementation according to jexl issue:
JMeter using JexlExpression instead of JexlScript
Bug is fixed now and will be uploaded next version
I download latest JMeter 4,
As part of Remote Testing
To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the JMETER_HOME/bin/jmeter-server (unix) or JMETER_HOME/bin/jmeter-server.bat (windows) script.
I try to execute jmeter-server.bat in windows 7
and got the following error:
Server failed to start: java.rmi.server.ExportException: Listen failed on port:
0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find
the file specified)
An error occurred: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find
the file specified)
errorlevel=1
It seems that a file rmi_keystore.jks is missing. (I can't find it in JMeter folders)
In JMeter 3.3 jmeter-server.bat is working.
EDIT 1
after I execute create-rmi-keystore.bat it created rmi_keystore.jks, but I get other error:
Server failed to start: java.rmi.server.ExportException: Listen failed on port:
0; nested exception is:
java.io.IOException: java.security.UnrecoverableKeyException: Cannot rec
over key
An error occurred: Listen failed on port: 0; nested exception is:
java.io.IOException: java.security.UnrecoverableKeyException: Cannot rec
over key
errorlevel=1
error from log:
2018-02-11 12:09:13,916 ERROR o.a.j.e.DistributedRunner: Failed to create engine at 127.0.0.1
java.rmi.ConnectIOException: Exception creating connection to: 127.0.0.1; nested exception is:
java.io.IOException: java.security.UnrecoverableKeyException: Cannot recover key
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) ~[?:1.8.0_25]
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) ~[?:1.8.0_25]
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) ~[?:1.8.0_25]
at sun.rmi.server.UnicastRef.newCall(Unknown Source) ~[?:1.8.0_25]
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) ~[?:1.8.0_25]
at org.apache.jmeter.engine.ClientJMeterEngine.getEngine(ClientJMeterEngine.java:70) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.ClientJMeterEngine.<init>(ClientJMeterEngine.java:83) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.DistributedRunner.createEngine(DistributedRunner.java:237) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.DistributedRunner.getClientEngine(DistributedRunner.java:213) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.engine.DistributedRunner.init(DistributedRunner.java:93) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter$$Lambda$63/2068100669.run(Unknown Source) [ApacheJMeter_core.jar:4.0 r1823414]
at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.access$400(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_25]
at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_25]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_25]
Caused by: java.io.IOException: java.security.UnrecoverableKeyException: Cannot recover key
at org.apache.jmeter.rmi.SSLRMIClientSocketFactory.createSocket(SSLRMIClientSocketFactory.java:110) ~[ApacheJMeter_core.jar:4.0 r1823414]
... 28 more
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(Unknown Source) ~[?:1.8.0_25]
at sun.security.provider.JavaKeyStore.engineGetKey(Unknown Source) ~[?:1.8.0_25]
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(Unknown Source) ~[?:1.8.0_25]
at java.security.KeyStore.getKey(Unknown Source) ~[?:1.8.0_25]
at sun.security.ssl.SunX509KeyManagerImpl.<init>(Unknown Source) ~[?:1.8.0_25]
at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(Unknown Source) ~[?:1.8.0_25]
at javax.net.ssl.KeyManagerFactory.init(Unknown Source) ~[?:1.8.0_25]
at org.apache.jmeter.rmi.SSLRMIClientSocketFactory.createSocket(SSLRMIClientSocketFactory.java:103) ~[ApacheJMeter_core.jar:4.0 r1823414]
... 28 more
2018-02-11 12:09:24,368 INFO o.a.j.e.DistributedRunner: Failed to configure 127.0.0.1
2018-02-11 12:09:24,369 INFO o.a.j.e.DistributedRunner: Stopping remote engines
2018-02-11 12:09:24,370 INFO o.a.j.e.DistributedRunner: Remote engines have been stopped
2018-02-11 12:09:24,370 ERROR o.a.j.g.a.ActionRouter: Error processing org.apache.jmeter.gui.action.RemoteStart#3249a1ce
java.lang.RuntimeException: Following remote engines could not be configured:[127.0.0.1]
at org.apache.jmeter.engine.DistributedRunner.init(DistributedRunner.java:112) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) ~[ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.gui.action.ActionRouter$$Lambda$63/2068100669.run(Unknown Source) [ApacheJMeter_core.jar:4.0 r1823414]
at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.access$400(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_25]
at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_25]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [?:1.8.0_25]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_25]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_25]
EDIT 2
I tried to change server.rmi.ssl.keystore.password to password I wrote but got a different error
Server failed to start: java.rmi.server.ExportException: Listen failed on port:
0; nested exception is:
java.io.IOException: Keystore was tampered with, or password was incorre
ct
An error occurred: Listen failed on port: 0; nested exception is:
java.io.IOException: Keystore was tampered with, or password was incorre
ct
EDIT 3
I tried to set the server port manually SET SERVER_PORT=1099 according to reference but still trying to listen through port 0
On Windows this can be done by:
SET SERVER_PORT=
To solve issue, you need to follow:
http://jmeter.apache.org/usermanual/remote-test.html#setup_ssl
The problem was the answer to first question when executing create-rmi-keystore
What is your first and last name?
I should have answered rmi as it the default value in JMeter's property server.rmi.ssl.keystore.alias
Also (difference from JMeter 3.3) I needed to change JMeter's property remote_hosts so that it uses my host name (change from 127.0.0.1)
This is related to :
https://bz.apache.org/bugzilla/show_bug.cgi?id=62039
Had the same problem.
To solve it you have several options:
Set rmi-keystore password to changeit, as described in jmeter.properties:
Password of Trust store
server.rmi.ssl.truststore.password=changeit
If using custom password - add it to user.properties on jmeter-server machine
Disable SSL by passing -Jserver.rmi.ssl.disable=true
What worked for me (with JMeter 5.0) was an dedicated jmeter-server.properties file with this configurations:
# Type of keystore : JKS
server.rmi.ssl.keystore.type=JKS
#
# Keystore file that contains private key
server.rmi.ssl.keystore.file=rmi_keystore.jks
#
# Password of Keystore
server.rmi.ssl.keystore.password=changeit
#
# Key alias
server.rmi.ssl.keystore.alias=rmi
#
# Type of truststore : JKS
server.rmi.ssl.truststore.type=JKS
#
# Keystore file that contains certificate
server.rmi.ssl.truststore.file=rmi_keystore.jks
#
# Password of Trust store
server.rmi.ssl.truststore.password=changeit
I created a rmi_keystore.jks file with the create-rmi-keystore command in the JMeter bin folder. Then I started my server with jmeter-server -Gjmeter-server.properties. Also check then the log from the server to get the endpoint to connect your client with the server as user7294900 suggested.
Created remote object: UnicastServerRef2 [liveRef: [endpoint:[<this is your server>
I faced all the above problems, until i found the solution to it, which is this:
The error java.security.UnrecoverableKeyException: Cannot recover key occurs when the keystore and keyEntry passwords are different.
To resolve this issue, you must remove all traces of the past certificate and request file.
You must generate a new keystore, keyEntry and CSR and specify the same password for the keystore and the keyEntry.
There are two batch files in your bin folder. Run the "create-rmi-keystore" file first and then "jmeter"