1

I have a java RMI application that works OK when you have it on 2 different Linux machines. Now I do not have the other laptop available to make some new test so I try to put the application on a virtual box in a new machine that have Windows 7. It seems that the application look after the object register in virtual box about 2 minutes and then this exception appear:

java.rmi.ConnectException: Connection refused to host: 192.168.1.48;

nested except and the exception propagates... I already exported the port 1099 from virtual box(i did this because I have the same application done with Linux sockets and C and I needed to export the port(in that case 14555) from virtual machine in order to work).

Any suggestion?

mipe34
  • 5,596
  • 3
  • 26
  • 38
  • 1
    Are you sure the IP is correct? A virtual machine should have a different IP than your computer, unless I'm confused about how exporting ports in VirtualBox works. – millimoose Apr 07 '13 at 20:05
  • Also, I'd look at what this answer mentions might be the problem: http://stackoverflow.com/a/4859541/41655 – millimoose Apr 07 '13 at 20:06
  • I looked at that post and the port 1099 is used after I forwarded it. The IPs are correct I checked them several times. As I said I used the same application written in c (and using directly sockets) and I reached this IP. – Marian-Emanuel Ionascu Apr 07 '13 at 20:43
  • Is 192.168.1.48 the expected IP address within the virtual box? – user207421 Apr 08 '13 at 00:57
  • Yes it is. I have a wireless router that assigns the same address every time so if with C sockets worked I suppose that the Ip is the right one. I also checked the ip in virtual box and is ok. – Marian-Emanuel Ionascu Apr 08 '13 at 10:29
  • What's the nested exception? Edit the entire stack trace into your question. And can you ping that IP address from that client? – user207421 Apr 09 '13 at 05:17
  • RMI uses several ports. See http://stackoverflow.com/questions/3071376/what-port-is-used-by-java-rmi-connection – fglez Apr 11 '13 at 08:47

0 Answers0