English 中文(简体)
Debugging JConsole Line Failed
原标题:Debugging JConsole Connection Failed

我有一个网络应用程序,安装在遥远的树脂服务器上,而且数据交换系统已经投入使用。

我可以打电话给远程服务器,即:

franz@see:/tmp$ telnet <remote-ip> 5555
Trying <remote-ip>...
Connected to <remote-ip>.
Escape character is  ^] .
��sr5javax.management.remote.message.HandshakeBeginMessage�,���6profilestLjava/lang/String;Lversionq~xppt1.0^]

telnet> q
Connection closed.

但是,我无法利用我的乔索尔与我联系。

$JAVA_HOME/bin/java -cp $JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:pm-common/lib/jmxremote_optional-1_0_1_3.jar sun.tools.jconsole.JConsole service:jmx:jmxmp://<remote-ip>:5555

我曾尝试过以下 j瓦版本,但我曾两次见过Failed。

## where JAVA_HOME=/opt/java/64/jdk1.5.0_22
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)

## where JAVA_HOME=/opt/java/64/jdk1.6.0_17
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)

你们是否对如何推翻这一点有任何想法(即找出什么错误)?

最佳回答

保证你以 following树特性为主。

-Dcom.sun.management.jmxremote.port=9005
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

Try to connect now. If you want to debug this ,you can run the jconsole with following command

jconsole -J-Djava.util.logging.config.file=path_to_logging.properties_for_jconsole

以下是伐木的内容。 财产档案

Logging.properties

handlers = java.util.logging.ConsoleHandler


.level = INFO

java.util.logging.ConsoleHandler.level = FINEST

java.util.logging.ConsoleHandler.formatter = 

java.util.logging.SimpleFormatter

// Use FINER or FINEST for javax.management.remote.level - FINEST is

// very verbose...

javax.management.level = FINEST

javax.management.remote.level = FINER

一旦你操作<代码>jconsole,一个单独的窗口将登上显示器。

问题回答

if you run jconsole -debug it gives you more diagnostic info on the failure. See the Daniel Fuchs blog entry "Troubleshooting connection problems in JConsole".

我这样做了,并表明我使用了32条铁.,目标过程始于不同的(64比特) j,因此显然允许这样做,因此失败了。

这最后使我得以工作: 给予这一额外选择: - Djava.rmi.server.hostname=<ip Addres where jvm is entre

因此,从遥远机器开 j门的所有空洞论点都必须从遥控机器上开始。

 -Dcom.sun.management.jmxremote.authenticate=false  -Dcom.sun.management.jmxremote.port=<port> -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<ip address>

整个过程列于

我在从 Java-Process开始通过cy格温时也遇到了同样的问题。 JConsole不能连接起来。 开始时,一切照预期,都会打赢7倍。

I don t know if this is helpful, but perhaps you should use the the jconsole binary in the JDK bin directory rather than using the undocumented (and subject to change) sun.* classes to start up the console

如果您的申请是running on JDK 1.6 那么,你就应该能够连接起来。 如果在1.6之前使用JDK> 之后,它又具体指明了以下国际交易日志论点:

-Dcom.sun. management.jmxremote

我也持有同样的问题,即遥控机器在防火墙后面,防火墙正在阻挡由<代码>-Dcom.sun. management.jmxremote.port和RMI46924界定的港口。 在允许我ect住这些港口之后,我顺便说一遍。

If you are accessing a machine behind a firewall, you need to open both JMX and RMI ports.
In this context, you are much better off forcing the value for RMI than relying on the auto assigned
In my case, I was trying to access Tomcat so I had to do the following:

#!/bin/sh
CATALINA_OPTS="$CATALINA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8008 -Dcom.sun.management.jmxremote.rmi.port=8007 -Dcom.sun.
management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

之后

firewall-cmd --zone=public --add-port=8008/tcp --permanent
firewall-cmd --zone=public --add-port=8007/tcp --permanent
firewall-cmd --reload

对我来说,我正在利用当地进程的联系,而且问题与欧佩组织相同。 我的误解是,“如果是地方性的,那么环境就会遭到拒绝?” 不一定。

另一名用户Jeneral James在一篇关于mar语回答的评论中提到了我完全相同的症状。

解决的是脱离空间网络(或者在连接甚广域网的同时使局域网上网)——我空域网环境中的无过失配置。

我按照罗伯尔包装公司的建议,通过操作<条码>jconsole -debug发现这一问题,并且向我显示,IIP在相关尝试中(尽管与当地程序有联系)并不期望。 当时,我的专用设施完全分散了当地网络的连接,因此 j正在研究当地的知识产权,获得价值,但是由于“地方联系”的配置,不允许IP连接起来。

表面上说, j(或利用JMX数据对该事项进行估算的任何其他甲基溴)即使用于当地连接,也将使用这种不正确的IP。 我希望这能帮助其他人走出来,我花了3天时间利用多管束流线和 j文件,直到发现这一 -择。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...