我试图简单地将 XMPPPY 连接到 Openfire,发送一条消息,然后关闭。问题是我不断得到
(Python 2.6)
导入 xmpp
pwd = "密码"
jid=xmpp.protocol.JID("testuser@localhost")
cl=xmpp.Client(jid.getDomain()) #翻译为'localhost'
cl.connect()
DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance at 0x190ea1b8> into <xmpp.client.Client instance at 0x190e5320>
DEBUG: socket start Successfully connected to remote host ('localhost', 5222)
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x190ea2d8> into <xmpp.client.Client instance at 0x190e5320>
cl.auth(jid.getNode(),pwd) #translates to 'testuser' / 'password'
DEBUG: sasl error Failed SASL authentification: <not-authorized />
DEBUG: sasl stop Plugging <xmpp.auth.SASL instance at 0x190f0320> out of <xmpp.client.Client instance at 0x190e5320>.
我 100% 确定用户名和密码是正确的,因为我已经尝试了很多次并且可以通过 Spark 连接。
有没有我想念的地方/有人在这方面取得了成功?