can't run java RMI server
Relative linux newbie, although I did have this working before I tore down
and rebuilt my network (moral: leave well enough alone).
Details: Running Redhat 7.2; hostname is 'linux1'. I'm not using DNS, so the etc/hosts looks like
[root@linux1 etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
169.245.45.220 linux1 linux1
169.254.45.210 xp1 xp1
127.0.0.1 localhost.localdomain localhost
etc/host.conf is
[root@linux1 etc]# cat host.conf
order hosts,bind
I can telnet or ftp in to linux1 from the XP box (xp1). However, I can't run a simple RMI server on linux1. If I try to start the server (after starting the rmiregistry) using linux1 as the url, then I get:
[widdjr@linux1 rmitry]$ rmiregistry -J-Djava.security.policy=client.policy &
[1] 1425
[widdjr@linux1 rmitry]$ java ProductServer &
[2]! 1437
[widdjr@linux1 rmitry]$ Constructing server implmentations...
Binding server implementations to registry...
Error: java.rmi.ConnectIOException: Exception creating connection to: linux1; nested exception is:
java.net.SocketException: Network is unreachable
If I change the url to 'localhost' in the server, I can start the server, but then I cannot run the client:
widdjr@linux1 rmitry]$ java ProductServer &
[3] 1510
[widdjr@linux1 rmitry]$ Constructing server implmentations...
Binding server implementations to registry...
Waiting for invocations from client...
[widdjr@linux1 rmitry]$ java -Djava.security.policy=client.policy ProductClient localhost
Error: java.rmi.ConnectIOException: Exception creating connection to: 169.245.45.220; nested exception is:
java.net.SocketException: Network is unreachable
Also, although I can telnet or ftp in to linux1 from the XP box, I cannot ping or telnet or ftp to linux1 from linux1, which seems odd. (I can ping, telnet, or ftp 'localhost' from linux1, and can ping xp1.)
Any ideas much appreciated.
|