0

I'm trying to run jstatd on an Amazon EC2 linux server we have with this:

jstatd -J-Djava.security.policy=/usr/lib/jvm/java-6-openjdk/bin/jstatd.all.policy -J-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx

and I get this result:

Could not contact registry
Connection refused to host: 10.212.XX.XX; nested exception is:
        java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host: 10.212.XX.XX; nested exception is:
etc

But I've no idea why it's trying to connect to 10.212.XX.XX, it looks like an internal ip but it's not the internal ip of that server or any of our servers. Why is it trying to connect to this and how can I change it?

Notes: Above IP addresses are just for example to hide actual IPs

Satish
  • 16,544
  • 29
  • 93
  • 149
Richard
  • 21
  • 2
  • Just an advice never ever use your actual IPs or real information on public post. – Satish Feb 13 '13 at 18:22
  • There is a same question: http://stackoverflow.com/questions/4865650/jps-cant-connect-to-a-remote-jstatd – Satish Feb 13 '13 at 18:33
  • Thanks re IPs. I did see that post but wasn't sure it was the same, as the host it's trying to connect to is wrong? – Richard Feb 13 '13 at 21:24

1 Answers1

1

I was having a hard time with the same problem, and I found the answer in another post.

In my particular case after troubleshooting another errors, I found that hostname -i was returning a weird IP address, not the one configured on the server.

The solution, was to edit /etc/hosts an add an entry for matching the server's ip address.

Perhaps is the same situation here.

Community
  • 1
  • 1
Vianney
  • 11
  • 1