Reputation: 940
I am runing JBoss AS 5 on Unix. I want to start visualGC remotely from windows 7.
First, I have create an RMI Registry on port 31111 -because the RMI registery default port was busy- using the command rmiregistry 31111 &
.
Second, I tried to start a jstatd server using the command jstatd -p 8725 -J-Djava.security.policy=/app/home/user/jstatd.policy
.
Third, I started the Jboss Server.
Fourth, I got the process id of the server which is 9740.
Last, I returned to windows 7 and I tried to run this command visualgc [email protected]:31111
.Unfortunately it returned with the following error:
Remote Exception attaching to rmi://[email protected]:31111
Can you please explain to me what I am doing wrong?
Thanks in advance.
Upvotes: 0
Views: 1815
Reputation: 31
Maybe you need to provide java.rmi.server.hostname property to jstatd. Like so:
jstatd -p 8725 -J-Djava.security.policy=/app/home/user/jstatd.policy -J-Djava.rmi.server.hostname=XX.XXX.X.XX
See RMI RemoteException for details.
Upvotes: 3
Reputation: 940
I have found the answer to my own question.Unfortunately, the remote JMX do not always work with JBoss.
The following table summarize the cases:
JBoss Version - JDK - Works
4.2.3 ---- ---- 1.5 -- Yes
4.2.3 --------- 1.6 -- Yes
5.0.1 --------- 1.5 -- No
5.0.1 --------- 1.6 --- Yes
5.1 ----------- 1.5 -- No
5.1 ----------- 1.6 -- No
For more information refer to this.
Upvotes: 1