• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI client server don't work on ipv6 machines

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used jdk 1.6 and got the following errors

C:\ClientServer>java -classpath "C:\ClientServer" RmiClient 1234::5679 3232 QWE
RTY
sending QWERTY to 1234::5679:3232
java.rmi.ConnectException: Connection refused to host: 1234::5679; nested except
ion is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at RmiClient.main(RmiClient.java:22)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
... 6 more
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check your firewall. That exception you're getting means that your code attempts to connect but that connection is rejected. Main causes are the port not being active, and the port being blocked by a firewall.
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The test environment is at my work place. I'll check the status of the firewall, on Tuesday, when i go to the office. Thanks for the reply.
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Filrewall is off on both the machines.
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Firewalls on both the machines are disabled.................
Port 3232 is in listening mode as per netstat -an....................
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code works perfectly fine when both the client and the server are running on IPV4 machines.................
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both the ipv6 machines have XP service pack3 installed on it. They are vmware virtual machines.
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code failed on XP (IPv6) and Win2k3(IPv6). But it worked perfectly fine on Win2k8(IPv6)..... When the server was on W2k8 proper details of the client was displayed. I ran the client on both W2k3 and W2k8 and server on W2k8.
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question boils down to: Why does the code not work on Win 2003?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that IPV6 has been installed on your 2003 machine?

Bill
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am successfully able to ping my 2003 machine's ipv6 address via my 2008 machine......................................
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must also mention that the ipconfig command doesn't give any output on my 2003 machine. I just get a string saying "Windows IP configuration is" followed by nothing...................
 
Mustafa Dasorwala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have noticed that rmiregistry crashes (without warning/error), before server completely starts, on win 2003.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic