Hello,

Yes, that is pretty much the error I get.    I don't even have the latest 1.6 JDK, just the JRE, so the ' import java' route was useful.

Jython 2.5.2rc4 (Release_2_5_2rc4:7200, Feb 14 2011, 23:43:30)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_24
Type "help", "copyright", "credits" or "license" for more information.
>>> import java
>>> ipv6_addr=java.net.InetSocketAddress("::1",9999)
>>> s=java.nio.channels.SocketChannel.open()
>>> s.socket().connect(ipv6_addr)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
        at sun.nio.ch.Net.connect(Native Method)
        at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
        at sun.nio.ch.SocketAdaptor.connect(Unknown Source)
        at sun.nio.ch.SocketAdaptor.connect(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)

java.net.SocketException: java.net.SocketException: Address family not supported
 by protocol family: connect


I conclude that JRE6 64bit has some IPv6 problems still.  Do you think I should try to report that to Oracle/Sun/Java folks?

The Windows 7 install should be pretty clean, I did it from a MS disk since I am basically the IT department :-).   I guess I could also try this with the 32 bit JRE and see if it works (not sure the 32 bit JRE will even run under 64 bit Windows).

Thanks for the fast feedback and diagnosis,

Peter

On Sat, Feb 26, 2011 at 2:49 PM, Alan Kennedy <report@bugs.jython.org> wrote:

Alan Kennedy <jython-dev@xhaus.com> added the comment:

Here is the same code in jython, but using the Java APIs directly, with no involvement from the jython socket module.

>>> import java
>>> ipv6_addr = java.net.InetSocketAddress("::1", 9999)
>>> s = java.nio.channels.SocketChannel.open()
>>> s.socket().connect(ipv6_addr)

Which I think will result in something like this on your system

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
       at sun.nio.ch.Net.connect(Native Method)
       at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
       at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81)
       at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:592)

java.net.SocketException: java.net.SocketException: Address family not supported by protocol family:
 connect

_______________________________________
Jython tracker <report@bugs.jython.org>
<http://bugs.jython.org/issue1711>
_______________________________________