RMI Problem

P

piterboss

Hi !



I have started RmiRegistry and RmiServer on computer with ip -
10.0.0.6

I want to run RMI client on another computer:

Registry registry = LocateRegistry.getRegistry("10.0.0.6");
Execute comp = (Execute) Naming.lookup("RmiServer");
RemoteAnswerMessage ram = comp.askForMessage(rqm);


I have only: java.net.connectException ConnectionRefused.

Help !

and when i'm starting rmiServer with option -
Djava.rmi.server.hostname="WiinieThePooh"
on the client side i have Connection refused to host "WiinieThePooh"

I don't understand it at all.
Client is connected to rmiServer, Data is sent (String -
"WiinieThePooh") and i have connection refused.....

Help !
 
D

Daniel Pitts

piterboss said:
Hi !



I have started RmiRegistry and RmiServer on computer with ip -
10.0.0.6

I want to run RMI client on another computer:

Registry registry = LocateRegistry.getRegistry("10.0.0.6");
Execute comp = (Execute) Naming.lookup("RmiServer");
RemoteAnswerMessage ram = comp.askForMessage(rqm);


I have only: java.net.connectException ConnectionRefused.

Help !

and when i'm starting rmiServer with option -
Djava.rmi.server.hostname="WiinieThePooh"
on the client side i have Connection refused to host "WiinieThePooh"

I don't understand it at all.
Client is connected to rmiServer, Data is sent (String -
"WiinieThePooh") and i have connection refused.....

Help !

Look up the what java.rmi.server.hostname DOES. You can't just give
it an abitrary name, it actually has to point to a real machine.
 
E

Esmond Pitt

Try it with -Djava.rmi.server.hostname=10.0.0.6 at the server. If this
works, and if the original ConnectException contained '127.0.0.1', check
your server's DNS or hosts file to make sure that your server host's
real IP address is mapped to its real public name, and that 'localhost'
is mapped to 127.0.0.1. Common Linux problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RMI & connection refused 10
RMI connection refused 14
RMI - at my wits end 3
rmi application thru NAT 1
RMI query 5
RMI app behind NAT firewall 1
Java RMI - registry questions 3
Java RMI questions and MyEclipse 8

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top