我用twisted/wokkel 库创建了一个简单的XMPP 机器人。当我在连接到外部 XMPP 服务器的本地计算机上运行它时,它运行得非常好。但是,当我从 xmpp 机器本身运行扭曲的脚本时,它会立即拒绝连接(或断开连接)。
我能够在 ejabberd 上禁用 TLS,问题就消失了。当然,这不是一个可行的解决方案,但可以为解决方案提供一些见解。传递给 wokkels connectionLost 方法的“原因”只是无。
任何建议将不胜感激!
(这是从与 jabber 相同的机器上运行时的错误):
2011-07-07 22:01:52+0000 [-] Log opened.
2011-07-07 22:01:52+0000 [-] twistd 11.0.0 (/usr/bin/python2.6 2.6.6) starting up.
2011-07-07 22:01:52+0000 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2011-07-07 22:01:52+0000 [-] Starting factory <twisted.words.protocols.jabber.xmlstream.XmlStreamFactory object at 0x169df50>
2011-07-07 22:01:52+0000 [XmlStream,client] Connection lost: None
2011-07-07 22:01:52+0000 [XmlStream,client] <twisted.internet.tcp.Connector instance at 0x1120dd0> will retry in 2 seconds
2011-07-07 22:01:52+0000 [XmlStream,client] Stopping factory <twisted.words.protocols.jabber.xmlstream.XmlStreamFactory object at 0x169df50>
2011-07-07 22:01:52+0000 [-] Main loop terminated.
2011-07-07 22:01:52+0000 [-] Server Shut Down.