Search code examples
xmppejabberdxmpppy

XMPP get error while authentication


I am using a xmpppy library to connect with XMPP server... I was able to connect with server but while authentication get error "Plugging ignored: another instance already plugged."

What does this error mean and how can I resolve it??

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

In [38]: jid = xmpp.protocol.JID('gathole@localhost')

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

Solution

  • It requires change the in XMPP ejabberd server config. Change the line {hosts, ["localhost"]} with {hosts, ["localhost", "server-domain", "server-ip-address"]} in the ejabberd.cfg file. Restart the server and create another user under new hosts with the server domain or server ip.