2013-09-23 11 views
0

JVisualVM을 jstatd에 연결하려고합니다. 그러나 내 원격 서버에서 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 

당신이 잘못 JDK를 사용하는

# ./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 

답변

0

오류. 이 sun.jvmstat.monitor.remote.RemoteHost not found in gnu.gcj.runtime.SystemClassLoader은 GCJ를 사용하여 Jstatd를 실행하고 있음을 보여줍니다. OpenJDK 또는 Oracle JDK를 사용하십시오.