gpt4 book ai didi

java - 如何使用JPDA调试jmeter-server?

转载 作者:行者123 更新时间:2023-12-02 07:25:02 24 4
gpt4 key购买 nike

我正在为 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

我错过了什么吗?

最佳答案

挂起参数之前有一个额外的空格,这会导致 JVM 将其解释为第一个非选项参数(即主类名)。

尝试将上面的行替换为:

set JVM_ARGS=-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=1099,suspend=n

关于java - 如何使用JPDA调试jmeter-server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13680582/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com