[Twisted-Python] twisted.names.error.DNSNameError on MacOsX but not on linux

Gabriel Rossetti gabriel.rossetti at arimaz.com
Thu Aug 27 14:37:31 MDT 2009


Ralph Meijer wrote:
> On Tue, 2009-08-11 at 18:30 +0200, Gabriel Rossetti wrote:
>   
>> [..]
>>     
>
> Apparently you modified the original example here:
>
>   
>> [..]
>>         connector = XMPPClientConnector(reactor, "10.204.232.117", f)
>>         connector.connect()
>>     
>
> This would never work properly. XMPPClientConnector is designed to do an
> SRV record look up on the /domain/ provided as its second argument. You
> pass an IP address here and that will just fail.
>
> The original example passes client_jid.host. This extracts the domain
> from the JID you want to connect with and then follows the procedure of
> first trying to find xmpp-server SRV records for that domain, and if
> that fails, try to connect to the host that the domain name resolves to,
> using the default port (5222), as outlined in RFC 3920. Note that
> XMPPClientConnector avoids the problems sketched in ticket #3456 that
> was mentioned by Jean-Paul.
>
> If you really want to connect to a specific host instead of following
> the above procedure, you can do this instead of the code quoted above:
>
>     reactor.connectTCP("10.204.232.117", 5222, f)
>
>   
Hmmm, ok, it works on linux and windows though, but I did as you said 
anyways as it's still flacky on mac. Thanks,
Gabriel

-- 
Arimaz SA
Ingénieur en Informatique
Av. du 24 Janvier 11
Ateliers de la Ville de Renens, Atelier 5
1020 Renens, Switzerland
www.arimaz.com
www.mydeskfriend.com
Mob: +41-(0)79-539-0069
Tel: +41-(0)21-566-7343





More information about the Twisted-Python mailing list