4

在 Ubuntu Amazon 实例中运行 Jmeter 时,我收到以下错误 -

ubuntu@ip-172-31-22-219:~/Jmeter/apache-jmeter-2.9/bin$ jmeter
[warning] /usr/bin/jmeter: Unable to locate commons-net in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-activation-1.1-spec in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-javamail-1.4-provider in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate jboss-j2ee in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate jdom1 in /usr/share/java
[warning] /usr/bin/jmeter: No JAVA_CMD set for run_java, falling back to JAVA_CMD = java
java.lang.Throwable: Could not access /usr/share/jmeter/lib/junit
        at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:96)
An error occurred: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.

我不知道问题到底出在哪里。有人可以帮忙吗?

谢谢, 维马尔

4

2 回答 2

1
jmeter -n -t MyTestPlan.jmx

-n 确保它在非 GUI 模式下运行。

你应该看到类似的东西 -

Created the tree successfully using Post Request.jmx
Starting the test @ Mon Jun 02 16:10:44 IST 2014 (1401705644820)
Waiting for possible shutdown message on port 4445
Tidying up ...    @ Mon Jun 02 16:10:47 IST 2014 (1401705647509)
... end of run
于 2014-06-02T10:43:11.230 回答
1

似乎您正在尝试启动 JMeter 的 GUI 版本而不是 NON GUI 版本。如果你想在命令行上运行 JMeter,你可以看看这个页面:http: //developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/

于 2013-10-17T11:54:17.800 回答