Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"java.lang.IllegalArgumentException: Results log file is not empty" error showing while generate dashboard report for Non GUI mode in jmeter3.0

Tags:

java

jmeter

After the test run, I have generated a dashboard report using Non-GUI mode for jmeter3.0 in a linux environment. I have generated report using the following format in my terminal.

[vairamuthu_m@igstdev053 /]$ jmeter3 -n -t /home/local/IGSTDEV/vairamuthu_m/Desktop/kycstd.jmx -l 
/home/local/IGSTDEV/vairamuthu_m/Desktop/std.jtl -e -o
/home/local/IGSTDEV/vairamuthu_m/Desktop/Jmeter3.0_testplan/result/sturesult.csv

Below error showing:

Writing log file to: /jmeter.log
log_file=jmeter.log java.io.FileNotFoundException: jmeter.log (Permission denied)              
[log_file-> System.out]
2016/09/17 11:42:29 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US               
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Loading user properties from: /opt/SDK/apache-jmeter-3.0/bin/user.properties  
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Loading system properties from: /opt/SDK/apache-jmeter-3.0/bin/system.properties   
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation                                                           
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Version 3.0 r1743807  
2016/09/17 11:42:29 INFO  - jmeter.JMeter: java.version=1.7.0_25      
2016/09/17 11:42:29 INFO  - jmeter.JMeter: java.vm.name=Java HotSpot(TM) Server VM                
2016/09/17 11:42:29 INFO  - jmeter.JMeter: os.name=Linux                       
2016/09/17 11:42:29 INFO  - jmeter.JMeter: os.arch=i386            
2016/09/17 11:42:29 INFO  - jmeter.JMeter: os.version=3.11.10-301.fc20.i686         
2016/09/17 11:42:29 INFO  - jmeter.JMeter: file.encoding=UTF-8               
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Max memory     =805306368 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Available Processors =2 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Default Locale=English (United States) 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: JMeter  Locale=English (United States) 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: JMeterHome=/opt/SDK/apache-jmeter- 3.0 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: user.dir  =/  
2016/09/17 11:42:29 INFO  - jmeter.JMeter: PWD       =/ 
2016/09/17 11:42:29 INFO  - jmeter.JMeter: IP: 127.0.0.1 Name: igstdev053 FullName: igstdev053.igstdev.com  
2016/09/17 11:42:29 INFO  - jmeter.JMeter: Setting property 'jmeter.reportgenerator.outputdir' to:'/home/local/IGSTDEV/vairamuthu_m/Desktop/Jmeter3.0_testplan/result/sturesult.txt'                                      
2016/09/17 11:42:29 INFO  - jmeter.services.FileServer: Default base='/' 
2016/09/17 11:42:29 INFO  - jmeter.services.FileServer: Set new base='/home/local/IGSTDEV/vairamuthu_m/Desktop'                             
2016/09/17 11:42:29 INFO  - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2                                      
2016/09/17 11:42:29 INFO  - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8 
2016/09/17 11:42:29 INFO  - jmeter.save.SaveService: Using SaveService properties version 2.9 
2016/09/17 11:42:29 INFO  - jmeter.save.SaveService: All converter versions present and correct 
2016/09/17 11:42:29 INFO  - jmeter.save.SaveService: Loading file: /home/local/IGSTDEV/vairamuthu_m/Desktop/kycstd.jmx 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_ 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 
2016/09/17 11:42:29 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser 
2016/09/17 11:42:30 INFO  - jmeter.JMeter: Creating summariser <summary> 
Creating summariser <summary>
2016/09/17 11:42:30 INFO  - jmeter.report.dashboard.ReportGenerator: ReportGenerator will use for Parsing the separator:',' 
Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:/home/local/IGSTDEV/vairamuthu_m/Desktop/std.jtl is not empty
2016/09/17 11:42:30 ERROR - jmeter.JMeter: Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:/home/local/IGSTDEV/vairamuthu_m/Desktop/std.jtl is not empty
    at org.apache.jmeter.report.dashboard.ReportGenerator.<init>(ReportGenerator.java:134)
    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:922)
    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:876)
    at org.apache.jmeter.JMeter.start(JMeter.java:501)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.jmeter.NewDriver.main(NewDriver.java:259)

Kindly give me a solution...

Thanks, Vairamuthu.

like image 206
Vairamuthu Avatar asked Sep 17 '16 06:09

Vairamuthu


2 Answers

You can also use new feature of overriding jtl file (since JMeter 3.3)

jmeter ... -f -l std.jtl -e -o ...

Report Generation : -f of -forceDeleteResultFile option

like image 77
user7294900 Avatar answered Sep 22 '22 23:09

user7294900


As per the stacktrace:

2016/09/17 11:42:30 ERROR - jmeter.JMeter: Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:/home/local/IGSTDEV/vairamuthu_m/Desktop/std.jtl is not empty at org.apache.jmeter.report.dashboard.ReportGenerator.(ReportGenerator.java:134)

JMeter is informing you that file "/home/local/IGSTDEV/vairamuthu_m/Desktop/std.jtl" is not empty because it doesn't want to overwrite it.

So either remove it if you don't need its content or change the output file to another name.

like image 23
UBIK LOAD PACK Avatar answered Sep 18 '22 23:09

UBIK LOAD PACK