Socket accepts ipv6 addresses, but can not connect to them

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Socket accepts ipv6 addresses, but can not connect to them

Bart Gauquie
Dear all,

I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.

Following test is going fine:
SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

(connect to a socket on localhost)

however, following test:

testConnectToLocalhostThroughNetNameResolverLocalHostAddress
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver localHostAddress.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

is failing with following error:
ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)

[] in Socket>>connectTo:waitForConnectionFor:
Socket>>waitForConnectionFor:ifTimedOut:
Socket>>connectTo:waitForConnectionFor:
Socket>>connectTo:
Socket>>connectTo:port:
[] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
BlockClosure>>ensure:
SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
SocketTest(TestCase)>>performTest
[] in [] in SocketTest(TestCase)>>runCase
BlockClosure>>ensure:

I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
If i do ipconfig on my machine:

Ethernet-adapter LAN-verbinding:

Verbindingsspec. DNS-achtervoegsel: lan
Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
IPv4-adres. . . . . . . . . . . . : 10.0.0.39
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 10.0.0.138

its the same ipv6 address.

Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).

Is this the behaviour that i can expect ? 
The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.

In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( ) 

Kind regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
Gravitation is not responsible for people falling in love. - Albert Einstein

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

SocketTest.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Schwab,Wilhelm K
FWIW, I am fairly certain the IPv6 changes are incomplete at best.  Others have reported needing to override #useOldNetwork to always answer true, and I have noted things that are called "in the clear" when they should be hidden behind an old net test.
 
So far, I have done what amounts to some glorified loopback tests and have watched MC download packages from IPv4 addresses.
 
Bill
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
Sent: Monday, November 16, 2009 4:26 PM
To: [hidden email]
Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them

Dear all,

I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.

Following test is going fine:
SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

(connect to a socket on localhost)

however, following test:

testConnectToLocalhostThroughNetNameResolverLocalHostAddress
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver localHostAddress.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

is failing with following error:
ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)

[] in Socket>>connectTo:waitForConnectionFor:
Socket>>waitForConnectionFor:ifTimedOut:
Socket>>connectTo:waitForConnectionFor:
Socket>>connectTo:
Socket>>connectTo:port:
[] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
BlockClosure>>ensure:
SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
SocketTest(TestCase)>>performTest
[] in [] in SocketTest(TestCase)>>runCase
BlockClosure>>ensure:

I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
If i do ipconfig on my machine:

Ethernet-adapter LAN-verbinding:

Verbindingsspec. DNS-achtervoegsel: lan
Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
IPv4-adres. . . . . . . . . . . . : 10.0.0.39
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 10.0.0.138

its the same ipv6 address.

Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).

Is this the behaviour that i can expect ? 
The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.

In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( ) 

Kind regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
Gravitation is not responsible for people falling in love. - Albert Einstein

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Bart Gauquie
Hi,

If i modify the #useOldNetwork method, everything works. Thanks for that tip.

However: is this not a 'bug' in Pharo to have ipv6 as default, since it is not working properly? With my simple SocketTest not working for instance? 

Kind regards,

Bart


2009/11/16 Schwab,Wilhelm K <[hidden email]>
FWIW, I am fairly certain the IPv6 changes are incomplete at best.  Others have reported needing to override #useOldNetwork to always answer true, and I have noted things that are called "in the clear" when they should be hidden behind an old net test.
 
So far, I have done what amounts to some glorified loopback tests and have watched MC download packages from IPv4 addresses.
 
Bill
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
Sent: Monday, November 16, 2009 4:26 PM
To: [hidden email]
Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them

Dear all,

I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.

Following test is going fine:
SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

(connect to a socket on localhost)

however, following test:

testConnectToLocalhostThroughNetNameResolverLocalHostAddress
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver localHostAddress.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

is failing with following error:
ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)

[] in Socket>>connectTo:waitForConnectionFor:
Socket>>waitForConnectionFor:ifTimedOut:
Socket>>connectTo:waitForConnectionFor:
Socket>>connectTo:
Socket>>connectTo:port:
[] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
BlockClosure>>ensure:
SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
SocketTest(TestCase)>>performTest
[] in [] in SocketTest(TestCase)>>runCase
BlockClosure>>ensure:

I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
If i do ipconfig on my machine:

Ethernet-adapter LAN-verbinding:

Verbindingsspec. DNS-achtervoegsel: lan
Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
IPv4-adres. . . . . . . . . . . . : 10.0.0.39
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 10.0.0.138

its the same ipv6 address.

Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).

Is this the behaviour that i can expect ? 
The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.

In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( ) 

Kind regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
Gravitation is not responsible for people falling in love. - Albert Einstein

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Schwab,Wilhelm K
Bart,
 
Good question, and there is no easy answer.  The Linux world seems to be having convulsions over it, and every time I re-learn how to shut it off (it does bad things to my DNS lookup times), I find comments about how poorly designed it is.  I'm not saying the comments are correct, but I note them.
 
For now, IPv6 is probably better left for opt-in than opt-out.  There should probably also be very good separation between IPv4 and IPv6 name resolvers, allowing a clear separation of the associated primitives and methods that depend on them.
 
Bill
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
Sent: Tuesday, November 17, 2009 2:52 PM
To: [hidden email]
Subject: Re: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them

Hi,

If i modify the #useOldNetwork method, everything works. Thanks for that tip.

However: is this not a 'bug' in Pharo to have ipv6 as default, since it is not working properly? With my simple SocketTest not working for instance? 

Kind regards,

Bart


2009/11/16 Schwab,Wilhelm K <[hidden email]>
FWIW, I am fairly certain the IPv6 changes are incomplete at best.  Others have reported needing to override #useOldNetwork to always answer true, and I have noted things that are called "in the clear" when they should be hidden behind an old net test.
 
So far, I have done what amounts to some glorified loopback tests and have watched MC download packages from IPv4 addresses.
 
Bill
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
Sent: Monday, November 16, 2009 4:26 PM
To: [hidden email]
Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them

Dear all,

I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.

Following test is going fine:
SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

(connect to a socket on localhost)

however, following test:

testConnectToLocalhostThroughNetNameResolverLocalHostAddress
|serverSocket clientSocket address|

serverSocket := Socket newTCP.
clientSocket := Socket newTCP.

[ serverSocket listenOn: 6665.
address := NetNameResolver localHostAddress.
clientSocket connectTo: address port: 6665]
ensure: [
clientSocket close.
serverSocket close.
]

is failing with following error:
ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)

[] in Socket>>connectTo:waitForConnectionFor:
Socket>>waitForConnectionFor:ifTimedOut:
Socket>>connectTo:waitForConnectionFor:
Socket>>connectTo:
Socket>>connectTo:port:
[] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
BlockClosure>>ensure:
SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
SocketTest(TestCase)>>performTest
[] in [] in SocketTest(TestCase)>>runCase
BlockClosure>>ensure:

I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
If i do ipconfig on my machine:

Ethernet-adapter LAN-verbinding:

Verbindingsspec. DNS-achtervoegsel: lan
Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
IPv4-adres. . . . . . . . . . . . : 10.0.0.39
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 10.0.0.138

its the same ipv6 address.

Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).

Is this the behaviour that i can expect ? 
The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.

In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( ) 

Kind regards,

Bart

--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
Gravitation is not responsible for people falling in love. - Albert Einstein

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Stéphane Ducasse
In reply to this post by Bart Gauquie
No this is a good point.
Adrian we should really useOldNetwork in the final version

Stef

On Nov 17, 2009, at 8:51 PM, Bart Gauquie wrote:

> Hi,
>
> If i modify the #useOldNetwork method, everything works. Thanks for that tip.
>
> However: is this not a 'bug' in Pharo to have ipv6 as default, since it is not working properly? With my simple SocketTest not working for instance?
>
> Kind regards,
>
> Bart
>
>
> 2009/11/16 Schwab,Wilhelm K <[hidden email]>
> FWIW, I am fairly certain the IPv6 changes are incomplete at best.  Others have reported needing to override #useOldNetwork to always answer true, and I have noted things that are called "in the clear" when they should be hidden behind an old net test.
>  
> So far, I have done what amounts to some glorified loopback tests and have watched MC download packages from IPv4 addresses.
>  
> Bill
>  
>  
>
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
> Sent: Monday, November 16, 2009 4:26 PM
> To: [hidden email]
> Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them
>
> Dear all,
>
> I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.
>
> Following test is going fine:
> SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
> |serverSocket clientSocket address|
>
> serverSocket := Socket newTCP.
> clientSocket := Socket newTCP.
>
> [ serverSocket listenOn: 6665.
> address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
> clientSocket connectTo: address port: 6665]
> ensure: [
> clientSocket close.
> serverSocket close.
> ]
>
> (connect to a socket on localhost)
>
> however, following test:
>
> testConnectToLocalhostThroughNetNameResolverLocalHostAddress
> |serverSocket clientSocket address|
>
> serverSocket := Socket newTCP.
> clientSocket := Socket newTCP.
>
> [ serverSocket listenOn: 6665.
> address := NetNameResolver localHostAddress.
> clientSocket connectTo: address port: 6665]
> ensure: [
> clientSocket close.
> serverSocket close.
> ]
>
> is failing with following error:
> ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)
>
> [] in Socket>>connectTo:waitForConnectionFor:
> Socket>>waitForConnectionFor:ifTimedOut:
> Socket>>connectTo:waitForConnectionFor:
> Socket>>connectTo:
> Socket>>connectTo:port:
> [] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
> BlockClosure>>ensure:
> SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
> SocketTest(TestCase)>>performTest
> [] in [] in SocketTest(TestCase)>>runCase
> BlockClosure>>ensure:
>
> I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
> If i do ipconfig on my machine:
>
> Ethernet-adapter LAN-verbinding:
>
> Verbindingsspec. DNS-achtervoegsel: lan
> Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
> IPv4-adres. . . . . . . . . . . . : 10.0.0.39
> Subnetmasker. . . . . . . . . . . : 255.255.255.0
> Standaardgateway. . . . . . . . . : 10.0.0.138
>
> its the same ipv6 address.
>
> Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).
>
> Is this the behaviour that i can expect ?
> The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.
>
> In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( )
>
> Kind regards,
>
> Bart
>
> --
> imagination is more important than knowledge - Albert Einstein
> Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
> Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
> The true sign of intelligence is not knowledge but imagination. - Albert Einstein
> Gravitation is not responsible for people falling in love. - Albert Einstein
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Henrik Sperre Johansen
Not that I have any experience in the area, but would it be an idea to
rename it to useIPv4 as well?
I don't know about others, but the name of that method annoys me _every_
time I see this problem mentioned...

Cheers,
Henry

On 17.11.2009 22:13, Stéphane Ducasse wrote:

> No this is a good point.
> Adrian we should really useOldNetwork in the final version
>
> Stef
>
> On Nov 17, 2009, at 8:51 PM, Bart Gauquie wrote:
>
>    
>> Hi,
>>
>> If i modify the #useOldNetwork method, everything works. Thanks for that tip.
>>
>> However: is this not a 'bug' in Pharo to have ipv6 as default, since it is not working properly? With my simple SocketTest not working for instance?
>>
>> Kind regards,
>>
>> Bart
>>
>>
>> 2009/11/16 Schwab,Wilhelm K<[hidden email]>
>> FWIW, I am fairly certain the IPv6 changes are incomplete at best.  Others have reported needing to override #useOldNetwork to always answer true, and I have noted things that are called "in the clear" when they should be hidden behind an old net test.
>>
>> So far, I have done what amounts to some glorified loopback tests and have watched MC download packages from IPv4 addresses.
>>
>> Bill
>>
>>
>>
>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Gauquie
>> Sent: Monday, November 16, 2009 4:26 PM
>> To: [hidden email]
>> Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not connect to them
>>
>> Dear all,
>>
>> I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista , runtime 3.11.4.
>>
>> Following test is going fine:
>> SocketTest>>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
>> |serverSocket clientSocket address|
>>
>> serverSocket := Socket newTCP.
>> clientSocket := Socket newTCP.
>>
>> [ serverSocket listenOn: 6665.
>> address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
>> clientSocket connectTo: address port: 6665]
>> ensure: [
>> clientSocket close.
>> serverSocket close.
>> ]
>>
>> (connect to a socket on localhost)
>>
>> however, following test:
>>
>> testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> |serverSocket clientSocket address|
>>
>> serverSocket := Socket newTCP.
>> clientSocket := Socket newTCP.
>>
>> [ serverSocket listenOn: 6665.
>> address := NetNameResolver localHostAddress.
>> clientSocket connectTo: address port: 6665]
>> ensure: [
>> clientSocket close.
>> serverSocket close.
>> ]
>>
>> is failing with following error:
>> ConnectionTimedOut: Cannot connect to: fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)
>>
>> [] in Socket>>connectTo:waitForConnectionFor:
>> Socket>>waitForConnectionFor:ifTimedOut:
>> Socket>>connectTo:waitForConnectionFor:
>> Socket>>connectTo:
>> Socket>>connectTo:port:
>> [] in SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> BlockClosure>>ensure:
>> SocketTest>>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> SocketTest(TestCase)>>performTest
>> [] in [] in SocketTest(TestCase)>>runCase
>> BlockClosure>>ensure:
>>
>> I understand that the above address is an ipv6 address. (the NetNameResolver localHostAddress lookup returns on my machine a ipv6 address)
>> If i do ipconfig on my machine:
>>
>> Ethernet-adapter LAN-verbinding:
>>
>> Verbindingsspec. DNS-achtervoegsel: lan
>> Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
>> IPv4-adres. . . . . . . . . . . . : 10.0.0.39
>> Subnetmasker. . . . . . . . . . . : 255.255.255.0
>> Standaardgateway. . . . . . . . . : 10.0.0.138
>>
>> its the same ipv6 address.
>>
>> Is it normal that the Socket class can not handle ipv6 addresses ? I get a timeoutexception on it (however this happens immediately).
>>
>> Is this the behaviour that i can expect ?
>> The reason i noticed this is that I'm trying Magma, the server in a separate image but on the same machine, under ubuntu 9.10 everything worked fine, under Windows Vista it crashed, since internally it also uses NetNameResolver localHostAddress to connect to 'localhost', and i got the same connect timeout exception.
>>
>> In attachment, a fileout of the SocketTest (had to create a new testclass for this :-( )
>>
>> Kind regards,
>>
>> Bart
>>
>> --
>> imagination is more important than knowledge - Albert Einstein
>> Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
>> Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
>> The true sign of intelligence is not knowledge but imagination. - Albert Einstein
>> Gravitation is not responsible for people falling in love. - Albert Einstein
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>      
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
>    


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Socket accepts ipv6 addresses, but can not connect to them

Adrian Lienhard
In reply to this post by Stéphane Ducasse
I don't know the details about the "old" and "new" network  
implementation (IPv4 vs. IPv6?), but if the old works and the new does  
not we should definitely change the default back to the old one.

Adrian

On Nov 17, 2009, at 22:13 , Stéphane Ducasse wrote:

> No this is a good point.
> Adrian we should really useOldNetwork in the final version
>
> Stef
>
> On Nov 17, 2009, at 8:51 PM, Bart Gauquie wrote:
>
>> Hi,
>>
>> If i modify the #useOldNetwork method, everything works. Thanks for  
>> that tip.
>>
>> However: is this not a 'bug' in Pharo to have ipv6 as default,  
>> since it is not working properly? With my simple SocketTest not  
>> working for instance?
>>
>> Kind regards,
>>
>> Bart
>>
>>
>> 2009/11/16 Schwab,Wilhelm K <[hidden email]>
>> FWIW, I am fairly certain the IPv6 changes are incomplete at best.  
>> Others have reported needing to override #useOldNetwork to always  
>> answer true, and I have noted things that are called "in the clear"  
>> when they should be hidden behind an old net test.
>>
>> So far, I have done what amounts to some glorified loopback tests  
>> and have watched MC download packages from IPv4 addresses.
>>
>> Bill
>>
>>
>>
>> From: [hidden email] [mailto:[hidden email]
>> ] On Behalf Of Bart Gauquie
>> Sent: Monday, November 16, 2009 4:26 PM
>> To: [hidden email]
>> Subject: [Pharo-project] Socket accepts ipv6 addresses, but can not  
>> connect to them
>>
>> Dear all,
>>
>> I'm using Pharo1.0rc1 Latest update: #10493, on Windows Vista ,  
>> runtime 3.11.4.
>>
>> Following test is going fine:
>> SocketTest
>> >>testConnectToLocalhostThroughNetNameResolverAddressForNameLocalhost
>> |serverSocket clientSocket address|
>>
>> serverSocket := Socket newTCP.
>> clientSocket := Socket newTCP.
>>
>> [ serverSocket listenOn: 6665.
>> address := NetNameResolver addressForName: '127.0.0.1' timeout: 20.
>> clientSocket connectTo: address port: 6665]
>> ensure: [
>> clientSocket close.
>> serverSocket close.
>> ]
>>
>> (connect to a socket on localhost)
>>
>> however, following test:
>>
>> testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> |serverSocket clientSocket address|
>>
>> serverSocket := Socket newTCP.
>> clientSocket := Socket newTCP.
>>
>> [ serverSocket listenOn: 6665.
>> address := NetNameResolver localHostAddress.
>> clientSocket connectTo: address port: 6665]
>> ensure: [
>> clientSocket close.
>> serverSocket close.
>> ]
>>
>> is failing with following error:
>> ConnectionTimedOut: Cannot connect to:  
>> fe80::6dd3:7860:93c9:46a0%10(PC_xxx),6665(6665)
>>
>> [] in Socket>>connectTo:waitForConnectionFor:
>> Socket>>waitForConnectionFor:ifTimedOut:
>> Socket>>connectTo:waitForConnectionFor:
>> Socket>>connectTo:
>> Socket>>connectTo:port:
>> [] in  
>> SocketTest
>> >>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> BlockClosure>>ensure:
>> SocketTest
>> >>testConnectToLocalhostThroughNetNameResolverLocalHostAddress
>> SocketTest(TestCase)>>performTest
>> [] in [] in SocketTest(TestCase)>>runCase
>> BlockClosure>>ensure:
>>
>> I understand that the above address is an ipv6 address. (the  
>> NetNameResolver localHostAddress lookup returns on my machine a  
>> ipv6 address)
>> If i do ipconfig on my machine:
>>
>> Ethernet-adapter LAN-verbinding:
>>
>> Verbindingsspec. DNS-achtervoegsel: lan
>> Link-local IPv6-adres . . . . . . : fe80::6dd3:7860:93c9:46a0%10
>> IPv4-adres. . . . . . . . . . . . : 10.0.0.39
>> Subnetmasker. . . . . . . . . . . : 255.255.255.0
>> Standaardgateway. . . . . . . . . : 10.0.0.138
>>
>> its the same ipv6 address.
>>
>> Is it normal that the Socket class can not handle ipv6 addresses ?  
>> I get a timeoutexception on it (however this happens immediately).
>>
>> Is this the behaviour that i can expect ?
>> The reason i noticed this is that I'm trying Magma, the server in a  
>> separate image but on the same machine, under ubuntu 9.10  
>> everything worked fine, under Windows Vista it crashed, since  
>> internally it also uses NetNameResolver localHostAddress to connect  
>> to 'localhost', and i got the same connect timeout exception.
>>
>> In attachment, a fileout of the SocketTest (had to create a new  
>> testclass for this :-( )
>>
>> Kind regards,
>>
>> Bart
>>
>> --
>> imagination is more important than knowledge - Albert Einstein
>> Logic will get you from A to B. Imagination will take you  
>> everywhere - Albert Einstein
>> Learn from yesterday, live for today, hope for tomorrow. The  
>> important thing is not to stop questioning. - Albert Einstein
>> The true sign of intelligence is not knowledge but imagination. -  
>> Albert Einstein
>> Gravitation is not responsible for people falling in love. - Albert  
>> Einstein
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project