简体   繁体   English

如果JVM被挂起意味着什么?

[英]What does it mean if JVM is suspended?

When my application run . 当我的应用程序运行时。 I got a message says : 我收到一条消息说:

Ping: Timed out waiting for signal from JVM.
The JVM was launched with debug options so this may be because the JVM
is currently suspended by a debugger.  Any future timeouts during this
JVM invocation will be silently ignored.

What does that mean? 这意味着什么? It seems it will block any web request from outside? 看来它将阻止来自外部的任何Web请求? because when I upload a file to it, it failed. 因为当我上传文件到它时,它失败了。 help me . 帮我 。

When debugging code, one would usually set breakpoints in it in order to break the execution of the program at some point. 在调试代码时,通常会在其中设置breakpoints ,以便在某个时候中断程序的执行。 When the JVM encounters such breakpoint it suspends execution, and waits for the debugger to go further (step into / step over / step out / etc). 当JVM遇到这样的断点时,它会暂停执行,并等待调试器继续运行(进入/跳过/退出/等)。

If you have an UI Debugger (like Eclipse) attached to your process, you can control the execution flow from there, watch variable values etc. 如果您将UI调试器(如Eclipse)附加到您的进程,则可以从那里控制执行流,观察变量值等。

The message you're seeing, simply says, that the timeout you got, may be simply the result of such situation, and is shown by the Java Service Wrapper, as described here : 你看到的消息,只是说,你得到了超时,可能只是这样的状况的结果,是由Java服务包装所示, 这里描述

The Wrapper will decide that the JVM is using a debugger if the wrapper.java.command property is set to "jdb" or "jdb.exe" or if one of the wrapper.java.additional.<n> properties is set to "-Xdebug". 如果将wrapper.java.command属性设置为“ jdb”或“ jdb.exe”,或者将wrapper.java.additional。<n>属性之一设置为“”,则包装器将确定JVM正在使用调试器 -Xdebug”。

So it seems you are starting your app using Java Service Wrapper in debug mode, and when some of the timeouts expire, it warns you with the attached message. 因此,您似乎正在使用Java Service Wrapper在调试模式下启动应用程序,并且当某些超时到期时,它会通过附带的消息向您发出警告。

JVM debug options allow you to connect to the JVM and step through the code (Google java remote debugging for more info). JVM调试选项允许您连接到JVM并逐步执行代码(有关更多信息,请使用Google Java远程调试)。 Basically this means that code execution can be paused remotely and controlled (execute one statement at a time, check variable values, etc.). 基本上,这意味着可以远程暂停和控制代码执行(一次执行一个语句,检查变量值等)。 While this is very useful it can of course interfere with normal operation of a piece of software. 尽管这非常有用,但它当然会干扰软件的正常运行。 If you don't intend to run the JVM in debug mode, try to find out what's setting it and remove it (it might be in JAVA_OPTS (environment variable), or it could be in your start-up script or whatever you use to start the JVM. You're looking for a string that looks something like -Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=#number#, suspend=n . Delete all of this, comment it out, or whatever is appropriate for where it's being set, then restart your JVM. 如果您不打算在调试模式下运行JVM,请尝试找出设置它的内容并将其删除(它可能在JAVA_OPTS(环境变量)中,或者可以在您的启动脚本中或您使用过的任何东西中)启动JVM。您正在寻找一个类似于-Xdebug -Xrunjdwp:server=y, transport=dt_socket,address=#number#, suspend=n的字符串。删除所有这些,将其注释掉,或诸如此类适用于要设置的位置,然后重新启动JVM。

What does that mean? 这意味着什么?

The message is coming from Java Service Wrapper . 该消息来自Java Service Wrapper The wrapper has tried to "ping" the JVM and gotten no response. 包装程序已尝试“ ping” JVM,但未得到任何响应。 It most likely means that you are debugging the JVM and have paused it. 这很可能意味着您正在调试JVM并已将其暂停。 While the JVM is paused, it cannot respond to external requests of any kind. JVM暂停时,它无法响应任何外部请求。 All threads are frozen ... 所有线程被冻结...

It seems it will block any web request from outside? 看来它将阻止来自外部的任何Web请求? because when I upload a file to it, it failed. 因为当我上传文件到它时,它失败了。 help me 帮我

Yes, it would do that if you've paused the JVM. 是的,如果您暂停了JVM,它就会这样做。 Unpause the JVM and it should start responding again. 取消暂停JVM,它将重新开始响应。

Note that if you launch the application from an IDE in debug mode, the JVM may start in a paused state ... depending on your IDE settings / launch configurations. 请注意,如果您以调试模式从IDE启动应用程序,则JVM可能会以暂停状态启动……这取决于您的IDE设置/启动配置。


The only other explanation I can think of is that you might have a problem with your network or virtual network configuration (eg packet filters or virtual network routing) that is causing large scale lossage of network packets. 我能想到的唯一其他解释是您的网络或虚拟网络配置(例如,数据包筛选器或虚拟网络路由)可能存在问题,导致网络数据包大量丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM