Using attach api in java to connect to remote server

518 views Asked by At

When I'm trying to use attach api I'm getting an error

com.sun.tools.attach.AttachNotSupportedException: Invalid process identifier

I'm connecting with VirtualMachine vmRemote = VirtualMachine.attach("rmi://<processid>@<server_name>:1099"); My desctop is windows based and remote server is linux. As I catch tools.jar consists of only sun.tools.attach.WindowsAttachProvider may be it leads to this problem? During connection I could see in jstatd log

FINER: RMI TCP Connection(10)#####: [######: sun.tools.jstatd.RemoteVmImpl[-6dd825ef:15ab396432e:-7fe5, -3475770279103225284]: public abstract int sun.jvmstat.monitor.remote.RemoteVm.getCapacity() throws java.rmi.RemoteException]
0

There are 0 answers