我正在为 JMeter 开发插件,我想在运行时从 Intellij IDEA 连接到 jmeter-server。我在 jmeter.bat 中添加了以下字符串:
set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099, suspend=n
但是当我尝试连接时,我收到以下错误:
Listening for transport dt_socket at address: 1099
java.lang.NoClassDefFoundError: suspend=n
Caused by: java.lang.ClassNotFoundException: suspend=n
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: suspend=n. Program will exit.
Exception in thread "main" errorlevel=1
我已经在同一台机器上启动了 jmeter 和 jmeter-server,但是为 jmeter-server 指定了端口。你能解释一下,我做错了什么吗?
正如我被告知的那样,我试图删除 JVM_ARGS 中的额外空间,但仍然出现错误:
Found ApacheJMeter_core.jar
Listening for transport dt_socket at address: 1099
Created remote object: UnicastServerRef [liveRef: [endpoint:[192.168.56.1:50900](local),objID:[-6928e8c:13b637ed53e:-7fff, 6493737834091623438]]]
Problem creating registry: java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Continuing...
Server failed to start: java.rmi.RemoteException: Cannot start. See server log file.; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
An error occurred: Cannot start. See server log file.; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
Debugger failed to attach: timeout during handshake
我错过了什么吗?