2015-12-14 89 views
0

我正在使用xmpppy庫與XMPP服務器連接...我能夠與服務器連接,但驗證錯誤時發生錯誤「插入被忽略:已插入另一個實例」。XMPP在驗證時出錯

這個錯誤是什麼意思,我該如何解決?

In [37]: c.isConnected() 
Out[37]: '' 

In [38]: jid = xmpp.protocol.JID('[email protected]') 

In [39]: c.auth(jid.getNode(),'password', resource=jid.getResource()) 
DEBUG: sasl   start Plugging <xmpp.auth.SASL instance at 0x108fc2710> into <xmpp.client.Client instance at 0x109003c68> 
DEBUG: sasl   error Plugging ignored: another instance already plugged. 
Traceback (most recent call last): 
    File "/Users/gathole/.virtualenvs/driveu/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 459, in interact 
    line = self.raw_input(prompt) 
    File "/Users/gathole/.virtualenvs/driveu/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 528, in raw_input 
    line = py3compat.cast_unicode_py2(self.raw_input_original(prompt)) 
KeyboardInterrupt 
DEBUG: gen_auth  start Plugging <xmpp.auth.NonSASL instance at 0x108fc2710> into <xmpp.client.Client instance at 0x109003c68> 
DEBUG: gen_auth  error Plugging ignored: another instance already plugged. 
Traceback (most recent call last): 
    File "/Users/gathole/.virtualenvs/driveu/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 459, in interact 
    line = self.raw_input(prompt) 
    File "/Users/gathole/.virtualenvs/driveu/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 528, in raw_input 
    line = py3compat.cast_unicode_py2(self.raw_input_original(prompt)) 
KeyboardInterrupt 

回答

0

它需要更改XMPP ejabberd服務器配置。將ejabberd.cfg文件中的{hosts,[「localhost」,「server-domain」,「server-ip-address」]}行更改爲{hosts,[「localhost」]}。 重新啓動服務器並使用服務器域或服務器IP在新主機下創建另一個用戶。