XMPPPY 与 Openfire

发布于 2024-11-24 16:53:45 字数 1270 浏览 1 评论 0原文

我试图简单地将 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 连接。

是否有我缺少的设置/有人在这方面取得了成功吗?

I'm trying to simply connect XMPPPY to Openfire, send a message, then close. The problem is that I keep getting

(Python 2.6)

import xmpp

pwd = "password"

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

cl=xmpp.Client(jid.getDomain()) #which translates to '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>.

I'm 100% sure that the username and password are correct as I've tried many times and can connect via Spark.

Is there a setting somewhere that I'm missing / has anyone has success with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘴硬脾气大 2024-12-01 16:53:45

查找您的 jid 格式

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

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

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

lookup your jid format

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

the xmpp server name should same as name after '@'

check the xmpp server name at http://localhost:9090/index.jsp

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文