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
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'm running my Master Jmeter in my local laptop and created Slave in AWS EC2 Windows instance. I have set up the IP address of the EC2 in my master Jmeter properties file.
I also made sure that both the master and slave are having the same JMeter Version.
Now when i connect slave through gui or non gui mode i'm getting the below error.
Please help me resolve this.
14:52:23,294 ERROR o.a.j.g.a.ActionRouter: Error processing org.apache.jmeter.gui.action.RemoteStart#5b22b970
java.lang.RuntimeException: Following remote engines could not be configured:[172.31.3.238]
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 java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_171]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_171]
at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_171]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_171]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_171]
at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_171]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_171]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_171]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_171]
Looking into 172.31.3.238 address it seems you are trying to connect the private address of your AWS instance and you should be using the Public IP instead.
Also make sure that the relevant port 1099 by default is exposed via AWS Security Groups and your Windows firewall.
Also consider moving your master instance to AWS as well, otherwise you might get huge bills for the traffic which is free between AWS instances in the same region. See How to Perform Distributed Testing in JMeter for more information on setting up the connectivity between master and slaves.
When u create master/Slave relationship it is preferred to have both the machines in the same vlan so that there shouldn't be any communication issue, try to have them in same vlan and the check it..!!
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.
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 am recording my client web application. Till 3-4 steps I am able to record but after clicking on one option. I am getting page of "Connect to network" while clicking on the connect button, it will open new tab were I am getting bellow error.
How to overcome this and proceed with recording?
java.net.SocketException: Permission denied: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at `enter code here`org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)
at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:695)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:454)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:244)
Try adding the next line to system.properties file (lives in JMeter "bin" folder)
java.net.preferIPv4Stack=true
and restarting JMeter to pick the property up
Try upgrading to Java 8 and JMeter 3.3 (or whatever latest version is available at JMeter Downloads page)
Try the latest JMeter Nightly build
Going forward please include at least essential parts of jmeter.log file into your question so we could see JMeter version, Java version, etc.