【问题标题】:Issue starting jstatd问题启动 jstatd
【发布时间】:2013-09-23 13:57:15
【问题描述】:

我正在尝试将 JVisualVM 连接到 jstatd。但是在我的远程服务器上,我在启动 jstatd 时遇到了问题。

#  netstat -nlp | grep rmiregistry
tcp        0      0 0.0.0.0:1098                0.0.0.0:*                   LISTEN      7320/rmiregistry
tcp        0      0 0.0.0.0:34872               0.0.0.0:*                   LISTEN      7320/rmiregistry

错误

# ./jstatd -J-Djava.security.policy=jstatd.all.policy -p 1098
Could not bind //:1098/JStatRemoteHost to RMI Registry
java.rmi.UnexpectedException: undeclared checked exception; nested exception is:
        java.lang.ClassNotFoundException: sun.jvmstat.monitor.remote.RemoteHost not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
        at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
        at java.rmi.Naming.rebind(Naming.java:177)
        at sun.tools.jstatd.Jstatd.bind(Jstatd.java:57)
        at sun.tools.jstatd.Jstatd.main(Jstatd.java:143)
Caused by: java.lang.ClassNotFoundException: sun.jvmstat.monitor.remote.RemoteHost not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
        ... 4 more

【问题讨论】:

    标签: visualvm jvisualvm jstatd


    【解决方案1】:

    您使用了错误的 JDK。这个sun.jvmstat.monitor.remote.RemoteHost not found in gnu.gcj.runtime.SystemClassLoader 表明您正在使用GCJ 来运行Jstatd。请使用 OpenJDK 或 Oracle JDK。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-20
      • 2011-09-28
      相关资源
      最近更新 更多