0

XMPPPY を Openfire に接続し、メッセージを送信して閉じようとしています。問題は、私が取得し続けることです

(パイソン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>.

何度も試してみて、Spark 経由で接続できるので、ユーザー名とパスワードが正しいことは 100% 確信しています。

私が行方不明になっている設定はどこかにありますか/これで成功した人はいますか?

4

1 に答える 1

0

あなたのjidフォーマットを調べてください

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

xmpp サーバー名は「@」の後の名前と同じである必要があります

http://localhost:9090/index.jspで xmpp サーバー名を確認します。

于 2012-02-11T03:51:21.190 に答える