• Post Reply Bookmark Topic Watch Topic
  • New Topic

UnKnownHost Exception

 
amrit singh
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!!!
I am new to rmi
when i try to run a simple client server application
every thing worked fine but when i run the client
it gave me exception UnKnownHostException
what is missing
pls ne help will be Appreiciated
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amrita,
The client is not able to find the server machine using the Naming.lookup() call. The possible reasons could be :-
1) Host name invalid : Check the hostname.
for eg: http://mymachine.com:{port number}/{Server Name}
2) Check if you are connected to the network and are not behind a firewall.
Hope this helps.
Ashwin.
 
Pierre Dubeau
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When your start the Remote server add this line after

java -Djava.rmi.server.codebase= etc....
java -Djava.rmi.server.hostname=xxx.com <HelloServer> &
your don't need the server name in the host file of the client.
Pierre
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!