【问题标题】:XMPPPY with OpenfireXMPPPY 与 Openfire
【发布时间】:2011-07-14 15:43:47
【问题描述】:

我试图简单地将 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) #翻译成'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 连接。

是否有我遗漏的设置/有人在这方面取得了成功?

【问题讨论】:

    标签: python xmpp openfire xmpppy


    【解决方案1】:

    查找您的 jid 格式

    jid=xmpp.protocol.JID("testuser@localhost")

    xmpp 服务器名称应与“@”后的名称相同

    检查 xmpp 服务器名称 http://localhost:9090/index.jsp

    【讨论】:

      猜你喜欢
      • 2011-12-29
      • 2011-12-29
      • 1970-01-01
      • 1970-01-01
      • 2021-11-03
      • 2011-06-11
      • 1970-01-01
      • 2013-07-26
      • 2015-04-11
      相关资源
      最近更新 更多