apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.23k stars 2.08k forks source link

Cannot run program "keytool": CreateProcess error=2 when starting JMeter 3.2 in gui mode #4375

Closed asfimport closed 6 years ago

asfimport commented 7 years ago

Anthony Kearns (Bug 61026): Today i downloaded the new JMeter 3.2 build and tried to start it in gui mode e.g. ran the jmeter.bat from the bin folder.

JMeter started but i noticed there were errors in the log viewer. Please see the attached file for the exception details and my system details etc.

I do not have any third party plugins etc installed. I just literally downloaded and extracted and tried to run in user and admin mode.

Created attachment jmeter.log: Jmeter Log File

jmeter.log ```` 2017-04-22 23:18:24,416 INFO o.a.j.u.JMeterUtils: Setting Locale to en_GB 2017-04-22 23:18:24,443 INFO o.a.j.JMeter: Loading user properties from: user.properties 2017-04-22 23:18:24,444 INFO o.a.j.JMeter: Loading system properties from: system.properties 2017-04-22 23:18:24,455 INFO o.a.j.JMeter: Copyright (c) 1998-2017 The Apache Software Foundation 2017-04-22 23:18:24,455 INFO o.a.j.JMeter: Version 3.2 r1790748 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: java.version=1.8.0_131 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: os.name=Windows 7 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: os.arch=amd64 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: os.version=6.1 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: file.encoding=Cp1252 2017-04-22 23:18:24,456 INFO o.a.j.JMeter: Max memory =536870912 2017-04-22 23:18:24,457 INFO o.a.j.JMeter: Available Processors =4 2017-04-22 23:18:24,463 INFO o.a.j.JMeter: Default Locale=English (United Kingdom) 2017-04-22 23:18:24,463 INFO o.a.j.JMeter: JMeter Locale=English (United Kingdom) 2017-04-22 23:18:24,463 INFO o.a.j.JMeter: JMeterHome=C:\Users\Dell 15\Desktop\New JMeter\apache-jmeter-3.2 2017-04-22 23:18:24,463 INFO o.a.j.JMeter: user.dir =C:\Users\Dell 15\Desktop\New JMeter\apache-jmeter-3.2\bin 2017-04-22 23:18:24,464 INFO o.a.j.JMeter: PWD =C:\Users\Dell 15\Desktop\New JMeter\apache-jmeter-3.2\bin 2017-04-22 23:18:24,465 INFO o.a.j.JMeter: IP: 10.11.244.160 Name: Dell15-PC FullName: Dell15-PC 2017-04-22 23:18:24,806 INFO o.a.j.g.a.LookAndFeelCommand: Using look and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform] 2017-04-22 23:18:24,817 INFO o.a.j.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties 2017-04-22 23:18:25,782 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.' 2017-04-22 23:18:25,782 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.' 2017-04-22 23:18:27,907 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.assertions.BSFAssertion 2017-04-22 23:18:28,697 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.extractor.BSFPostProcessor 2017-04-22 23:18:28,783 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.modifiers.BSFPreProcessor 2017-04-22 23:18:28,855 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2017-04-22 23:18:28,856 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2017-04-22 23:18:28,856 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2017-04-22 23:18:28,856 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser 2017-04-22 23:18:28,856 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 2017-04-22 23:18:28,857 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser 2017-04-22 23:18:29,256 ERROR o.a.j.e.KeyToolUtils: Exception checking for keytool existence, will return false java.io.IOException: Cannot run program "keytool": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.8.0_131] at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:142) ~[jorphan.jar:3.2 r1790748] at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:125) ~[jorphan.jar:3.2 r1790748] at org.apache.jorphan.exec.KeyToolUtils.checkKeytool(KeyToolUtils.java:436) ~[jorphan.jar:3.2 r1790748] at org.apache.jorphan.exec.KeyToolUtils.(KeyToolUtils.java:94) ~[jorphan.jar:3.2 r1790748] at org.apache.jmeter.protocol.http.proxy.ProxyControl.(ProxyControl.java:248) ~[ApacheJMeter_http.jar:3.2 r1790748] at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.createPortPanel(ProxyControlGui.java:708) ~[ApacheJMeter_http.jar:3.2 r1790748] at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.init(ProxyControlGui.java:664) ~[ApacheJMeter_http.jar:3.2 r1790748] at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.(ProxyControlGui.java:239) ~[ApacheJMeter_http.jar:3.2 r1790748] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_131] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_131] at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_131] at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_131] at org.apache.jmeter.gui.util.MenuFactory.initializeMenus(MenuFactory.java:505) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.util.MenuFactory.(MenuFactory.java:169) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.control.gui.WorkBenchGui.createPopupMenu(WorkBenchGui.java:119) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:156) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:46) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:74) ~[ApacheJMeter_core.jar:3.2 r1790748] at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:59) ~[ApacheJMeter_core.jar:3.2 r1790748] at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_131] at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_131] at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_131] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_131] at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_131] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_131] at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_131] at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_131] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_131] at java.lang.ProcessImpl.(Unknown Source) ~[?:1.8.0_131] at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.8.0_131] ... 35 more 2017-04-22 23:18:29,822 INFO o.a.j.e.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_131\bin\keytool' 2017-04-22 23:18:29,823 INFO o.a.j.p.h.p.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file C:\Users\Dell 15\Desktop\New JMeter\apache-jmeter-3.2\bin\proxyserver.jks 2017-04-22 23:18:30,098 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.java.sampler.BSFSampler 2017-04-22 23:18:30,169 INFO o.a.j.s.FileServer: Default base='C:\Users\Dell 15\Desktop\New JMeter\apache-jmeter-3.2\bin' 2017-04-22 23:18:30,341 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement 2017-04-22 23:18:30,342 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler 2017-04-22 23:18:31,204 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.timers.BSFTimer 2017-04-22 23:18:31,257 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.visualizers.BSFListener 2017-04-22 23:18:31,603 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times 2017-04-22 23:18:31,603 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 2017-04-22 23:18:31,603 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true 2017-04-22 23:18:31,603 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000 ````

Severity: normal OS: All

asfimport commented 7 years ago

@milamberspace (migrated from Bugzilla):

Thank you for your report. This not an issue, JMeter try several ways to find the keytool util. The error message just say that JMeter don't find keytool util from PATH environment variable. After JMeter finally found keytool from JAVA_HOME variable, so the keystore can be generated with success.

So JMeter 3.2 despite the -not-error message will work correctly on your machine.

I've change this message from the level ERROR to INFO to avoid this (false) error message (and move the stacktrace into DEBUG level).

Thanks

URL: http://svn.apache.org/viewvc?rev=1792359&view=rev Log: Cannot run program "keytool": CreateProcess error=2 when starting JMeter 3.2 in gui mode Change level (from ERROR to INFO) of the exception message when JMeter try to find the keytool util from PATH env var. It's not a error because JMeter try to find keytool with several ways. Little code format to allow better code review. https://github.com/apache/jmeter/issues/4375

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java jmeter/trunk/xdocs/changes.xml