I have a java program that acts as s TCP server and I need to test its performance.
Written a tcp sampler jmeter request and I am able to get response data correctly but the response code is 500 and there are errors thrown in logs
TCPClientClassName : TCPClientImpl
Response : 500
Checked "Reuse Connection", "Set No Delay" options
Thread Name: Thread Group 1-1
Sample Start: 2014-10-15 17:33:51 IST
Load time: 514
Latency: 0
Size in bytes: 14
Headers size in bytes: 0
Body size in bytes: 14
Sample Count: 1
Error Count: 1
Response code: 500
Response message: org.apache.jmeter.protocol.tcp.sampler.ReadException:
Exception in logs
2014/10/15 17:35:14 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2014/10/15 17:35:14 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2014/10/15 17:35:14 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2014/10/15 17:35:14 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2014/10/15 17:35:14 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2014/10/15 17:35:14 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2014/10/15 17:35:14 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2014/10/15 17:35:14 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2014/10/15 17:35:14 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2014/10/15 17:35:14 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2014/10/15 17:35:14 INFO - jmeter.protocol.tcp.sampler.TCPClientImpl: Using platform default charset:windows- 1252
2014/10/15 17:35:14 INFO - jmeter.protocol.tcp.sampler.TCPSampler: Using eolByte=10
2014/10/15 17:35:15 ERROR - jmeter.protocol.tcp.sampler.TCPSampler: org.apache.jmeter.protocol.tcp.sampler.ReadException:
at org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl.read(TCPClientImpl.java:117)
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:414)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl.read(TCPClientImpl.java:104)
... 4 more
2014/10/15 17:35:15 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2014/10/15 17:35:15 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2014/10/15 17:35:15 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
First, To check that your TCP server is really running, run :
telnet host:port
If it still fails, it might be because Firewall is not open between JMeter and target server hosting your TCP server
Related
I am trying to load test my tcp server which is created using spring integration using JMeter. I am able to establish the connection with the server using TcpSampler in JMeter, but the server is unable to receive the text sent.
Below are my logs
INFO o.a.j.e.StandardJMeterEngine: Running the test!
INFO o.a.j.s.SampleEvent: List of sample_variables: []
INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
INFO o.a.j.e.StandardJMeterEngine: Test will stop abruptly on error
INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
INFO o.a.j.t.ThreadGroup: Started thread group number 1
INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
INFO o.a.j.p.t.s.TCPClientImpl: Using platform default charset:UTF-8
TcpServer accepts ByteArrayCrLfSerializer
In Jmeter, what should be EOL byte value?
Add a JSR223 Pre-Processor under your sampler with following code:
vars.put("LF",URLDecoder.decode("%0A", "ASCII"));
vars.put("CR",URLDecoder.decode("%0D", "ASCII"));
Then append to your TCP message:
${CR}${LF}
I am using windows7 and the latest version of Jmeter. I created a simple HTTP Request Sampler and in the server name I added google.com
When I ran it I got the following error:
2015/11/30 14:15:32 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/11/30 14:15:32 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2015/11/30 14:15:32 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2015/11/30 14:15:32 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2015/11/30 14:15:32 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2015/11/30 14:15:32 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2015/11/30 14:15:32 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2015/11/30 14:15:32 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2015/11/30 14:15:32 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2015/11/30 14:15:32 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2015/11/30 14:15:33 INFO - jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/11/30 14:15:33 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/11/30 14:15:33 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/11/30 14:15:33 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
This is normal output of JMeter, it indicates that JMeter started and finished one thread one time.
You can visualize test results with Listeners, in particular View Results Tree is extremely useful for test script development and debugging.
As you can see at below image:
the request is successful (green triangle)
google search page is displayed at "Response data" tab
log viewer contains the same entries as you posted
Don't forget to disable listeners for the actual test execution, they consume a lot of resources. You'll be able to open results file after test run using "Browse" button and perform analysis.
See How to debug your Apache JMeter script article for detailed information on getting to the bottom of JMeter test script problem.
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/06/12 11:00:11 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2015/06/12 11:00:11 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2015/06/12 11:00:11 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2015/06/12 11:00:11 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2015/06/12 11:00:11 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2015/06/12 11:00:11 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.IllegalStateException: The driver executable does not exist: D:\Mm performance\apache-jmeter-2.13\apache-jmeter-2.13\bin
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:117)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:39)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.usingDriverExecutable(ChromeDriverService.java:116)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.getThreadService(ChromeDriverConfig.java:72)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:53)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:18)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.getPreparedBrowser(WebDriverConfig.java:233)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:220)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Thread.java:745)
2015/06/12 11:00:11 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/06/12 11:00:11 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/06/12 11:00:11 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
Download the latest version of ChromeDriver from http://chromedriver.storage.googleapis.com/index.html (if not yet)
Add the following line to system.properties file (the file lives under /bin folder of your JMeter installation)
webdriver.chrome.driver=d:/chromedriver.exe
You may have to substitute d:/chromedriver.exe with actual path to the ChromeDriver binary. Remember to use either forward slashes c:/somefoler/someotherfolder or escaped back slashes c:\\somefolder\\someotherfolder if you use Windows
Restart JMeter
ChromeDriver should work normally.
See Apache JMeter Properties Customization Guide for advanced information on various JMeter properties and ways of setting, using and overriding them.
I configured jmeter to run tests using Chrome Driver Config.
Test run with no errors:
2015/06/01 20:14:14 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/06/01 20:14:14 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2015/06/01 20:14:14 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2015/06/01 20:14:14 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2015/06/01 20:14:14 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2015/06/01 20:14:14 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2015/06/01 20:14:14 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2015/06/01 20:14:14 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2015/06/01 20:14:14 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2015/06/01 20:14:14 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2015/06/01 20:14:16 INFO - com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig: iterationStart()
2015/06/01 20:14:43 INFO - jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2015/06/01 20:14:43 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2015/06/01 20:14:44 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2015/06/01 20:14:44 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
But within the execution i see empty page only: http://screencast.com/t/REd78GizooEl
What can be the reason?
Solved the problem, by adjusting preferences (can't remember clear steps)
I am trying to load my CSV file in JMeter and I keep getting the error below. I have the file structure set as
c:\claimstest\claimsload.jmx
c:\claimstest\policies.csv
Any help would be greatly appreciated. I also attached a screenshot of the CSV Data Set Config
2012/05/30 10:09:20 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2012/05/30 10:09:20 INFO - jmeter.engine.StandardJMeterEngine: Ending thread Thread Group 1-1
2012/05/30 10:09:20 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2012/05/30 10:09:20 INFO - jmeter.services.FileServer: Close: policies.csv
2012/05/30 10:09:20 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
2012/05/30 10:09:20 INFO - jmeter.engine.StandardJMeterEngine: Test has ended on host null
2012/05/30 10:15:17 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2012/05/30 10:15:17 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2012/05/30 10:15:17 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2012/05/30 10:15:17 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2012/05/30 10:15:18 INFO - jmeter.engine.StandardJMeterEngine: All threads have been started
2012/05/30 10:15:18 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2012/05/30 10:15:18 INFO - jmeter.services.FileServer: Stored: policies.csv
2012/05/30 10:15:18 INFO - jmeter.services.FileServer: Stored:
2012/05/30 10:15:18 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: Could not read file header line
at org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:275)
at org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:132)
at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:387)
at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:379)
at org.apache.jmeter.control.GenericController.next(GenericController.java:144)
at org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:200)
at org.apache.jmeter.control.GenericController.next(GenericController.java:162)
at org.apache.jmeter.control.LoopController.next(LoopController.java:108)
at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:75)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\claimstest (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at org.apache.jmeter.services.FileServer.createBufferedReader(FileServer.java:341)
at org.apache.jmeter.services.FileServer.readLine(FileServer.java:318)
at org.apache.jmeter.services.FileServer.readLine(FileServer.java:302)
at org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:273)
... 10 more
2012/05/30 10:15:18 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2012/05/30 10:15:18 INFO - jmeter.engine.StandardJMeterEngine: Ending thread Thread Group 1-1
2012/05/30 10:15:18 INFO - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2012/05/30 10:15:18 INFO - jmeter.services.FileServer: Close: policies.csv
2012/05/30 10:15:18 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(false,*local*)
2012/05/30 10:15:18 INFO - jmeter.engine.StandardJMeterEngine: Test has ended on host null
If anyone is getting such a error please try launching the apache J-meter with admin rights.
You just need to say "Run as administrator" & it works, It accept the csv path provided in the bin directory or anywhere in the system. It works for me.
You use CSV Data Set Config with empty Filename ("").
JMeter try read CSV file from path {current directory} + "" = "C:\claimstest".
But "C:\claimstest" is directory.
JMeter write error:
Caused by: java.io.FileNotFoundException: C:\claimstest (Access is denied)
Use Ctrl+F and find "CSV".
You find CSV Data Set Config with empty Filename, remove it.