一旦从Linuxmint终端运行JMeter。抛出以下错误,并且在JMeter UI模式下,UI-> Option->没有可用的插件管理器。
org.jmeterplugins.repository.PluginManagerMenuCreator: Was unable to install pmgr cmdline tool java.nio.file.AccessDeniedException: /usr/share/jmeter/bin/PluginsManagerCMD.bat
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at java.nio.file.Files.copy(Files.java:3004)
at org.jmeterplugins.repository.PluginManagerCMDInstaller.writeOut(PluginManagerCMDInstaller.java:24)
at org.jmeterplugins.repository.PluginManagerCMDInstaller.main(PluginManagerCMDInstaller.java:12)
at org.jmeterplugins.repository.PluginManagerMenuCreator.getMenuItemsAtLocation(PluginManagerMenuCreator.java:16)
at org.apache.jmeter.gui.util.JMeterMenuBar.addPluginsMenuItems(JMeterMenuBar.java:579)
at org.apache.jmeter.gui.util.JMeterMenuBar.makeOptionsMenu(JMeterMenuBar.java:356)
at org.apache.jmeter.gui.util.JMeterMenuBar.createMenuBar(JMeterMenuBar.java:270)
at org.apache.jmeter.gui.util.JMeterMenuBar.<init>(JMeterMenuBar.java:163)
at org.apache.jmeter.gui.MainFrame.init(MainFrame.java:458)
at org.apache.jmeter.gui.MainFrame.<init>(MainFrame.java:216)
at org.apache.jmeter.JMeter.startGui(JMeter.java:234)
at org.apache.jmeter.JMeter.start(JMeter.java:382)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.jmeter.NewDriver.main(NewDriver.java:259)
2019/01/13 04:46:19 ERROR - org.jmeterplugins.repository.PluginManagerMenuCreator: Failed to load Plugins Manager java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
at org.jmeterplugins.repository.PluginManager.<init>(PluginManager.java:56)
at org.jmeterplugins.repository.PluginManager.<clinit>(PluginManager.java:44)
at org.jmeterplugins.repository.PluginManagerMenuItem.<init>(PluginManagerMenuItem.java:30)
at org.jmeterplugins.repository.PluginManagerMenuCreator.getMenuItemsAtLocation(PluginManagerMenuCreator.java:22)
at org.apache.jmeter.gui.util.JMeterMenuBar.addPluginsMenuItems(JMeterMenuBar.java:579)
at org.apache.jmeter.gui.util.JMeterMenuBar.makeOptionsMenu(JMeterMenuBar.java:356)
at org.apache.jmeter.gui.util.JMeterMenuBar.createMenuBar(JMeterMenuBar.java:270)
答案 0 :(得分:2)
有几个问题:
您对安装JMeter的文件夹没有写权限,您将需要使用chown命令来授予自己权限,例如:
sudo chown -R $USER:$USER /usr/share/jmeter
通常,根据JMeter最佳实践you should always be using the latest version of JMeter。使用插件管理器获取JMeter 5.0的步骤如下:
cd ~
wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.0.zip
unzip apache-jmeter-5.0.zip
wget http://central.maven.org/maven2/kg/apc/jmeter-plugins-manager/1.3/jmeter-plugins-manager-1.3.jar -P apache-jmeter-5.0/lib/ext/
PATH=~/apache-jmeter-5.0/bin:$PATH && export PATH && jmeter