2011-07-14 50 views
0

我試圖簡單地將XMPPPY連接到Openfire,發送消息,然後關閉。問題是,我不斷收到XMPPPY與Openfire

(Python 2.6中)

進口XMPP

PWD = 「密碼」

JID = xmpp.protocol.JID(「TESTUSER @ localhost「)

cl = xmpp.Client(jid.getDomain())#which轉換爲'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爲 'TESTUSER'/ '密碼'

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進行連接。

有沒有設置某處我失蹤/有人有這方面的成功?

回答

0

查找您的JID格式

JID = xmpp.protocol.JID( 「testuser的@ localhost」 的)

XMPP服務器名稱應相同後, '@'

檢查XMPP服務器名稱姓名http://localhost:9090/index.jsp