I am unable to use the RMI client server program on ipv6 machines.
1. When I run both client and server on the same machine(IPv6) the code works fine but it prints 127.0.0.1 as the clients ip address
2. When I run server on one machine(IPv6, works) and then i run client on another machine(IPv6) i get the following error
C:\j2sdk1.4.2_08\bin>
java -classpath "C:\ClientServer" RmiClient 1234:0000:0000:
0000:0000:0000:0000:5679 3232 XXX
sending XXX to 1234:0000:0000:0000:0000:0000:0000:5679:3232
java.rmi.ConnectIOException: Exception creating connection to: 1234:0000:0000:00
00:0000:0000:0000:5679; nested exception is:
java.net.SocketException: Protocol family not supported
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:580)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at RmiClient.main(RmiClient.java:22)
Caused by: java.net.SocketException: Protocol family not supported
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 5 more
Thanks & Regards
Mustafa I. Dasorwala