windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

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

windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

Bart Gauquie

I was trying out magma on Pharo. I'm using magma r43final on Pharo1.0rc1 Latest update: #10493 on Windows Vista 64 bit.

In order for the magma client wanting to connect to the server i had to adapt 
NetNameResolver>>useOldNetwork
  ^true

It worked till i tried the new high availability of magma. If i tried with a node to connect to a primary server i always got following error on the secondary node: MagmaSession>>signalExceptionLike with as message: 'a primitive has failed'. After some debugging i figured out that the it in fact was the primary server which sent to the secondary an Error object with message text: 'a primitive has failed'.

in the primary server log: 

MaLocalRequestServer(MaRequestServer)>>processRequest:
  Receiver: a MaLocalRequestServer 
  Arguments and temporary variables: 
   aMaClientServerRequest: a MaCommitRequest 
   answer: Error: a primitive has failed
  Receiver's instance variables: 
   console: a MaRequestServerConsole 
   processor: a MagmaRepositoryController 


Inspired by some issues mentioned @ google code, I tried to evaluate 
NetNameResolver localHostAddress
on the primary server image. That worked, however trying to print that resulted in 'a primitive has failed'.
Even after the NetNameResolver initializeNetwork suggestions I found.

error:

NetNameResolver class(Object)>>error:
Receiver: NetNameResolver
Arguments and temporary variables:
aString: 'a primitive has failed'
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

NetNameResolver class(Object)>>primitiveFailed
Receiver: NetNameResolver
Arguments and temporary variables:

Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

NetNameResolver class>>primGetNameInfo:flags:
Receiver: NetNameResolver
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

SocketAddress>>hostNumber
Receiver: <<error during printing>>
Arguments and temporary variables:
size: nil
name: nil
Receiver's instance variables:
<<error during printing>>

SocketAddress>>printOn:
Receiver: <<error during printing>>
Arguments and temporary variables:
aStream: a LimitedWriteStream ''
Receiver's instance variables:
<<error during printing>>

[] in SocketAddress(Object)>>printStringLimitedTo:
Receiver: <<error during printing>>
Arguments and temporary variables:
s: a LimitedWriteStream ''
Receiver's instance variables:
<<error during printing>>


I then tried to revert the changes to NetNameResolver back to:
useOldNetwork
    ^UseOldNetwork ~~ false


printing NetNameResolver localHostAddress now nicely printed a ipv6 address. However if i then try to connect to the primary server from the secondary server i get: 
MagmaSession>>signalExceptionLike

MagmaEnvironmentError: magma@PC_XX:51003 could not be made a warm backup because it is not reachable from magma@PC_XX:51001.

Which is again the same ipv6 error. So the problem i'm facing is that either of them work
I can connect with my magma client to the server if i enable ipv4 only, but then high availability dont work and vice verse.

Anyone any id how i can debug the primitive has failed on:
NetNameResolver class>>primGetNameInfo: socketAddress flags: flags
  <primitive: 'primitiveResolverGetNameInfo' module: 'SocketPlugin'>
   flags == 0 ifTrue: [^self primGetNameInfo: socketAddress
   flags: SocketAddressInformation numericFlag].
   self primitiveFailed

further more, why cant the primitiveFailed mention which primitive has failed?

Thanks,

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: windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

Ramiro Diaz Trepat-2
I am having the same issues trying to connet a Magma Client and a Magma Server in "localhost" using the latest Pharo on Snow Leopard (Mac).
It is this issue with NetNameResolver, I couldn't find a work around yet.  Forcing '127.0.0.1' for localhost used to work before, but not anymore.
Same image and code seemed to run fine under Linux though.
Cheers

r





2009/11/22 Bart Gauquie <[hidden email]>

I was trying out magma on Pharo. I'm using magma r43final on Pharo1.0rc1 Latest update: #10493 on Windows Vista 64 bit.

In order for the magma client wanting to connect to the server i had to adapt 
NetNameResolver>>useOldNetwork
  ^true

It worked till i tried the new high availability of magma. If i tried with a node to connect to a primary server i always got following error on the secondary node: MagmaSession>>signalExceptionLike with as message: 'a primitive has failed'. After some debugging i figured out that the it in fact was the primary server which sent to the secondary an Error object with message text: 'a primitive has failed'.

in the primary server log: 

MaLocalRequestServer(MaRequestServer)>>processRequest:
  Receiver: a MaLocalRequestServer 
  Arguments and temporary variables: 
   aMaClientServerRequest: a MaCommitRequest 
   answer: Error: a primitive has failed
  Receiver's instance variables: 
   console: a MaRequestServerConsole 
   processor: a MagmaRepositoryController 


Inspired by some issues mentioned @ google code, I tried to evaluate 
NetNameResolver localHostAddress
on the primary server image. That worked, however trying to print that resulted in 'a primitive has failed'.
Even after the NetNameResolver initializeNetwork suggestions I found.

error:

NetNameResolver class(Object)>>error:
Receiver: NetNameResolver
Arguments and temporary variables:
aString: 'a primitive has failed'
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

NetNameResolver class(Object)>>primitiveFailed
Receiver: NetNameResolver
Arguments and temporary variables:

Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

NetNameResolver class>>primGetNameInfo:flags:
Receiver: NetNameResolver
Arguments and temporary variables:
<<error during printing>
Receiver's instance variables:
superclass: Object
methodDict: a MethodDictionary()
format: 2
instanceVariables: nil
organization: ('as yet unclassified')

subclasses: nil
name: #NetNameResolver
classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true #ResolverBusy->...etc...
sharedPools: nil
environment: Smalltalk
category: #'Network-Kernel'
traitComposition: nil
localSelectors: nil

SocketAddress>>hostNumber
Receiver: <<error during printing>>
Arguments and temporary variables:
size: nil
name: nil
Receiver's instance variables:
<<error during printing>>

SocketAddress>>printOn:
Receiver: <<error during printing>>
Arguments and temporary variables:
aStream: a LimitedWriteStream ''
Receiver's instance variables:
<<error during printing>>

[] in SocketAddress(Object)>>printStringLimitedTo:
Receiver: <<error during printing>>
Arguments and temporary variables:
s: a LimitedWriteStream ''
Receiver's instance variables:
<<error during printing>>


I then tried to revert the changes to NetNameResolver back to:
useOldNetwork
    ^UseOldNetwork ~~ false


printing NetNameResolver localHostAddress now nicely printed a ipv6 address. However if i then try to connect to the primary server from the secondary server i get: 
MagmaSession>>signalExceptionLike

MagmaEnvironmentError: magma@PC_XX:51003 could not be made a warm backup because it is not reachable from magma@PC_XX:51001.

Which is again the same ipv6 error. So the problem i'm facing is that either of them work
I can connect with my magma client to the server if i enable ipv4 only, but then high availability dont work and vice verse.

Anyone any id how i can debug the primitive has failed on:
NetNameResolver class>>primGetNameInfo: socketAddress flags: flags
  <primitive: 'primitiveResolverGetNameInfo' module: 'SocketPlugin'>
   flags == 0 ifTrue: [^self primGetNameInfo: socketAddress
   flags: SocketAddressInformation numericFlag].
   self primitiveFailed

further more, why cant the primitiveFailed mention which primitive has failed?

Thanks,

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: windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

Adrian Lienhard
What exactly has changed in the networking code in Pharo compared to  
Squeak 3.9/3.10?

Adrian

On Nov 23, 2009, at 01:13 , Ramiro Diaz Trepat wrote:

> I am having the same issues trying to connet a Magma Client and a  
> Magma
> Server in "localhost" using the latest Pharo on Snow Leopard (Mac).
> It is this issue with NetNameResolver, I couldn't find a work around  
> yet.
> Forcing '127.0.0.1' for localhost used to work before, but not  
> anymore.
> Same image and code seemed to run fine under Linux though.
> Cheers
>
> r
>
>
>
>
>
> 2009/11/22 Bart Gauquie <[hidden email]>
>
>> This is related to:
>> http://lists.gforge.inria.fr/pipermail/pharo-project/2009-November/016021.html
>>
>> I was trying out magma on Pharo. I'm using magma r43final on  
>> Pharo1.0rc1
>> Latest update: #10493 on Windows Vista 64 bit.
>>
>> In order for the magma client wanting to connect to the server i  
>> had to
>> adapt
>> NetNameResolver>>useOldNetwork
>>  ^true
>>
>> It worked till i tried the new high availability of magma. If i  
>> tried with
>> a node to connect to a primary server i always got following error  
>> on the
>> secondary node: MagmaSession>>signalExceptionLike with as message: 'a
>> primitive has failed'. After some debugging i figured out that the  
>> it in
>> fact was the primary server which sent to the secondary an Error  
>> object with
>> message text: 'a primitive has failed'.
>>
>> in the primary server log:
>>
>> MaLocalRequestServer(MaRequestServer)>>processRequest:
>>  Receiver: a MaLocalRequestServer
>>  Arguments and temporary variables:
>>   aMaClientServerRequest: a MaCommitRequest
>>   answer: Error: a primitive has failed
>>  Receiver's instance variables:
>>   console: a MaRequestServerConsole
>>   processor: a MagmaRepositoryController
>>
>>
>> Inspired by some issues mentioned @ google code, I tried to evaluate
>> NetNameResolver localHostAddress
>> on the primary server image. That worked, however trying to print  
>> that
>> resulted in 'a primitive has failed'.
>> Even after the NetNameResolver initializeNetwork suggestions I found.
>>
>> error:
>>
>> NetNameResolver class(Object)>>error:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> aString: 'a primitive has failed'
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class(Object)>>primitiveFailed
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class>>primGetNameInfo:flags:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> <<error during printing>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> SocketAddress>>hostNumber
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> size: nil
>> name: nil
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> SocketAddress>>printOn:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> aStream: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> [] in SocketAddress(Object)>>printStringLimitedTo:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> s: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>>
>> I then tried to revert the changes to NetNameResolver back to:
>> useOldNetwork
>>    ^UseOldNetwork ~~ false
>>
>>
>> printing NetNameResolver localHostAddress now nicely printed a ipv6
>> address. However if i then try to connect to the primary server  
>> from the
>> secondary server i get:
>> MagmaSession>>signalExceptionLike
>>
>> MagmaEnvironmentError: magma@PC_XX:51003 could not be made a warm  
>> backup
>> because it is not reachable from magma@PC_XX:51001.
>>
>> Which is again the same ipv6 error. So the problem i'm facing is that
>> either of them work
>> I can connect with my magma client to the server if i enable ipv4  
>> only, but
>> then high availability dont work and vice verse.
>>
>> Anyone any id how i can debug the primitive has failed on:
>> NetNameResolver class>>primGetNameInfo: socketAddress flags: flags
>>  <primitive: 'primitiveResolverGetNameInfo' module: 'SocketPlugin'>
>>   flags == 0 ifTrue: [^self primGetNameInfo: socketAddress
>>   flags: SocketAddressInformation numericFlag].
>>   self primitiveFailed
>>
>> further more, why cant the primitiveFailed mention which primitive  
>> has
>> failed?
>>
>> Thanks,
>>
>> 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: windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

Ramiro Diaz Trepat-2
A bit more on this, although I have not debugged any code yet.

Start a Pharo image with Seaside running on port 8080

1)

'http://127.0.0.1:8080/seaside' asUrl retrieveContents.

Works on Linux, but NetNameResolver throws a "primitive has failed exception on a Mac with the latest VM.



2)

'http://localhost:8080/seaside' asUrl retrieveContents.

Time's out in both Linux and Mac



3)

'http://www.google.co.uk' asUrl retrieveContents

Works in both platforms







On Mon, Nov 23, 2009 at 10:19 AM, Adrian Lienhard <[hidden email]> wrote:
What exactly has changed in the networking code in Pharo compared to
Squeak 3.9/3.10?

Adrian

On Nov 23, 2009, at 01:13 , Ramiro Diaz Trepat wrote:

> I am having the same issues trying to connet a Magma Client and a
> Magma
> Server in "localhost" using the latest Pharo on Snow Leopard (Mac).
> It is this issue with NetNameResolver, I couldn't find a work around
> yet.
> Forcing '127.0.0.1' for localhost used to work before, but not
> anymore.
> Same image and code seemed to run fine under Linux though.
> Cheers
>
> r
>
>
>
>
>
> 2009/11/22 Bart Gauquie <[hidden email]>
>
>> This is related to:
>> http://lists.gforge.inria.fr/pipermail/pharo-project/2009-November/016021.html
>>
>> I was trying out magma on Pharo. I'm using magma r43final on
>> Pharo1.0rc1
>> Latest update: #10493 on Windows Vista 64 bit.
>>
>> In order for the magma client wanting to connect to the server i
>> had to
>> adapt
>> NetNameResolver>>useOldNetwork
>>  ^true
>>
>> It worked till i tried the new high availability of magma. If i
>> tried with
>> a node to connect to a primary server i always got following error
>> on the
>> secondary node: MagmaSession>>signalExceptionLike with as message: 'a
>> primitive has failed'. After some debugging i figured out that the
>> it in
>> fact was the primary server which sent to the secondary an Error
>> object with
>> message text: 'a primitive has failed'.
>>
>> in the primary server log:
>>
>> MaLocalRequestServer(MaRequestServer)>>processRequest:
>>  Receiver: a MaLocalRequestServer
>>  Arguments and temporary variables:
>>   aMaClientServerRequest: a MaCommitRequest
>>   answer: Error: a primitive has failed
>>  Receiver's instance variables:
>>   console: a MaRequestServerConsole
>>   processor: a MagmaRepositoryController
>>
>>
>> Inspired by some issues mentioned @ google code, I tried to evaluate
>> NetNameResolver localHostAddress
>> on the primary server image. That worked, however trying to print
>> that
>> resulted in 'a primitive has failed'.
>> Even after the NetNameResolver initializeNetwork suggestions I found.
>>
>> error:
>>
>> NetNameResolver class(Object)>>error:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> aString: 'a primitive has failed'
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class(Object)>>primitiveFailed
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class>>primGetNameInfo:flags:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> <<error during printing>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> SocketAddress>>hostNumber
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> size: nil
>> name: nil
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> SocketAddress>>printOn:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> aStream: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> [] in SocketAddress(Object)>>printStringLimitedTo:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> s: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>>
>> I then tried to revert the changes to NetNameResolver back to:
>> useOldNetwork
>>    ^UseOldNetwork ~~ false
>>
>>
>> printing NetNameResolver localHostAddress now nicely printed a ipv6
>> address. However if i then try to connect to the primary server
>> from the
>> secondary server i get:
>> MagmaSession>>signalExceptionLike
>>
>> MagmaEnvironmentError: magma@PC_XX:51003 could not be made a warm
>> backup
>> because it is not reachable from magma@PC_XX:51001.
>>
>> Which is again the same ipv6 error. So the problem i'm facing is that
>> either of them work
>> I can connect with my magma client to the server if i enable ipv4
>> only, but
>> then high availability dont work and vice verse.
>>
>> Anyone any id how i can debug the primitive has failed on:
>> NetNameResolver class>>primGetNameInfo: socketAddress flags: flags
>>  <primitive: 'primitiveResolverGetNameInfo' module: 'SocketPlugin'>
>>   flags == 0 ifTrue: [^self primGetNameInfo: socketAddress
>>   flags: SocketAddressInformation numericFlag].
>>   self primitiveFailed
>>
>> further more, why cant the primitiveFailed mention which primitive
>> has
>> failed?
>>
>> Thanks,
>>
>> 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: windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

Schwab,Wilhelm K
Does not surprise me.  I have been getting some DNU errors over #remoteAddress or something.  I need to dig into it and make sure I didn't cause it.  It further happens only on timeouts, so it was a bit more elusive.
 
I'll bet that if you look into it, you will find code that is sometimes protected by #useOldNetwork and other times called without the test.  We really need to separate the IPv4 and 6 code with subclasses so that we can see what is related to what - at least that is how I have approched the little bit of work I've been able to do on this.
 
While I am rambling, suppose a name maps to many addresses, and the DNS server is doing round-robin distribution.  What should NetNameResolver do in that case?  It was always giving me one particular address - the one to a host that did not exist.  $10 says somebody was using a Microsoft security tool to improve our network ;)
 
On the lighter side: I think I just successfully built an RC1 image!!!!
 
Bill
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Ramiro Diaz Trepat
Sent: Tuesday, November 24, 2009 7:17 PM
To: [hidden email]
Subject: Re: [Pharo-project] windows 64 bit: printing NetNameResolver localHostAddress fails even after evaluating NetNameResolver initializeNetwork

A bit more on this, although I have not debugged any code yet.

Start a Pharo image with Seaside running on port 8080

1)

'http://127.0.0.1:8080/seaside' asUrl retrieveContents.

Works on Linux, but NetNameResolver throws a "primitive has failed exception on a Mac with the latest VM.



2)

'http://localhost:8080/seaside' asUrl retrieveContents.

Time's out in both Linux and Mac



3)

'http://www.google.co.uk' asUrl retrieveContents

Works in both platforms







On Mon, Nov 23, 2009 at 10:19 AM, Adrian Lienhard <[hidden email]> wrote:
What exactly has changed in the networking code in Pharo compared to
Squeak 3.9/3.10?

Adrian

On Nov 23, 2009, at 01:13 , Ramiro Diaz Trepat wrote:

> I am having the same issues trying to connet a Magma Client and a
> Magma
> Server in "localhost" using the latest Pharo on Snow Leopard (Mac).
> It is this issue with NetNameResolver, I couldn't find a work around
> yet.
> Forcing '127.0.0.1' for localhost used to work before, but not
> anymore.
> Same image and code seemed to run fine under Linux though.
> Cheers
>
> r
>
>
>
>
>
> 2009/11/22 Bart Gauquie <[hidden email]>
>
>> This is related to:
>> http://lists.gforge.inria.fr/pipermail/pharo-project/2009-November/016021.html
>>
>> I was trying out magma on Pharo. I'm using magma r43final on
>> Pharo1.0rc1
>> Latest update: #10493 on Windows Vista 64 bit.
>>
>> In order for the magma client wanting to connect to the server i
>> had to
>> adapt
>> NetNameResolver>>useOldNetwork
>>  ^true
>>
>> It worked till i tried the new high availability of magma. If i
>> tried with
>> a node to connect to a primary server i always got following error
>> on the
>> secondary node: MagmaSession>>signalExceptionLike with as message: 'a
>> primitive has failed'. After some debugging i figured out that the
>> it in
>> fact was the primary server which sent to the secondary an Error
>> object with
>> message text: 'a primitive has failed'.
>>
>> in the primary server log:
>>
>> MaLocalRequestServer(MaRequestServer)>>processRequest:
>>  Receiver: a MaLocalRequestServer
>>  Arguments and temporary variables:
>>   aMaClientServerRequest: a MaCommitRequest
>>   answer: Error: a primitive has failed
>>  Receiver's instance variables:
>>   console: a MaRequestServerConsole
>>   processor: a MagmaRepositoryController
>>
>>
>> Inspired by some issues mentioned @ google code, I tried to evaluate
>> NetNameResolver localHostAddress
>> on the primary server image. That worked, however trying to print
>> that
>> resulted in 'a primitive has failed'.
>> Even after the NetNameResolver initializeNetwork suggestions I found.
>>
>> error:
>>
>> NetNameResolver class(Object)>>error:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> aString: 'a primitive has failed'
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class(Object)>>primitiveFailed
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> NetNameResolver class>>primGetNameInfo:flags:
>> Receiver: NetNameResolver
>> Arguments and temporary variables:
>> <<error during printing>
>> Receiver's instance variables:
>> superclass: Object
>> methodDict: a MethodDictionary()
>> format: 2
>> instanceVariables: nil
>> organization: ('as yet unclassified')
>>
>> subclasses: nil
>> name: #NetNameResolver
>> classPool: a Dictionary(#DefaultHostName->'' #HaveNetwork->true
>> #ResolverBusy->...etc...
>> sharedPools: nil
>> environment: Smalltalk
>> category: #'Network-Kernel'
>> traitComposition: nil
>> localSelectors: nil
>>
>> SocketAddress>>hostNumber
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> size: nil
>> name: nil
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> SocketAddress>>printOn:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> aStream: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>> [] in SocketAddress(Object)>>printStringLimitedTo:
>> Receiver: <<error during printing>>
>> Arguments and temporary variables:
>> s: a LimitedWriteStream ''
>> Receiver's instance variables:
>> <<error during printing>>
>>
>>
>> I then tried to revert the changes to NetNameResolver back to:
>> useOldNetwork
>>    ^UseOldNetwork ~~ false
>>
>>
>> printing NetNameResolver localHostAddress now nicely printed a ipv6
>> address. However if i then try to connect to the primary server
>> from the
>> secondary server i get:
>> MagmaSession>>signalExceptionLike
>>
>> MagmaEnvironmentError: magma@PC_XX:51003 could not be made a warm
>> backup
>> because it is not reachable from magma@PC_XX:51001.
>>
>> Which is again the same ipv6 error. So the problem i'm facing is that
>> either of them work
>> I can connect with my magma client to the server if i enable ipv4
>> only, but
>> then high availability dont work and vice verse.
>>
>> Anyone any id how i can debug the primitive has failed on:
>> NetNameResolver class>>primGetNameInfo: socketAddress flags: flags
>>  <primitive: 'primitiveResolverGetNameInfo' module: 'SocketPlugin'>
>>   flags == 0 ifTrue: [^self primGetNameInfo: socketAddress
>>   flags: SocketAddressInformation numericFlag].
>>   self primitiveFailed
>>
>> further more, why cant the primitiveFailed mention which primitive
>> has
>> failed?
>>
>> Thanks,
>>
>> 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