首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动jstatd时出现问题

启动jstatd时出现问题
EN

Stack Overflow用户
提问于 2013-09-23 21:57:16
回答 1查看 2.1K关注 0票数 0

我正在尝试将JVisualVM连接到jstatd。然而,在我的远程服务器上,启动jstatd时出现了问题。

代码语言:javascript
复制
#  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

错误

代码语言:javascript
复制
# ./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
EN

回答 1

Stack Overflow用户

发布于 2013-09-27 15:13:21

您正在使用错误的JDK。此sun.jvmstat.monitor.remote.RemoteHost not found in gnu.gcj.runtime.SystemClassLoader显示您正在使用GCJ运行Jstatd。请使用OpenJDK或Oracle JDK。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18961161

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档