DEBUG Event triggered: auth_success
DEBUG SEND (IMMED): <stream:stream to='xmpp.local' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
DEBUG RECV: <stream:stream version="1.0" from="xmpp.local" id="82d20984-aa62-449b-ae93-2461f3362f19">
DEBUG RECV: <stream:features xmlns="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></stream:features>
DEBUG Requesting resource:
DEBUG SEND (IMMED): <iq id="bbdd8713-79d7-45c8-ba66-bf2d567ebe88-1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></iq>
DEBUG RECV: <iq id="bbdd8713-79d7-45c8-ba66-bf2d567ebe88-1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>deadbeef0002@xmpp.local</jid></bind></iq>
DEBUG Event triggered: session_bind
ERROR Error reading from XML stream.
INFO JID set to: deadbeef0002@xmpp.local
DEBUG Event triggered: session_end
DEBUG Established Session
DEBUG SEND (IMMED): </stream:stream>
DEBUG Event triggered: auth_success
DEBUG SEND (IMMED): <stream:stream to='xmpp.local' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
DEBUG RECV: <stream:stream version="1.0" from="xmpp.local" id="00f600eb-bd21-4067-9f90-a100ec0920cd">
DEBUG RECV: <stream:features xmlns="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></stream:features>
DEBUG Requesting resource:
DEBUG SEND (IMMED): <iq id="489035d8-cbda-420f-a913-d9f14ce2865f-1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /></iq>
ERROR Error reading from XML stream.
DEBUG Event triggered: session_end
DEBUG SEND (IMMED): </stream:stream>
INFO Waiting for </stream:stream> from server
Failed is same, the last bind do not return to me: |
|
I've set up a minimalistic simplified xmppclient: #!/usr/bin/env python3 import argparse import logging import socket import json import uuid from sleekxmpp import ClientXMPP, Message from sleekxmpp.exceptions import IqError, IqTimeout logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s') parser = argparse.ArgumentParser(description='simple xmpp unity tester') parser.add_argument('--jid', help="jabberid name@site/service: %(default)s)", default='DEADBE...@xmpp.local') parser.add_argument('--pw', help="password for xmpp service, can be anything: %(default)s)", default='test1234test1234') parser.add_argument('--tojid', help="to jid in unity: %(default)s)", default='mas...@xmpp.local') parser.add_argument('--server', help="xmpp server hostname: %(default)s)", default='welfare-vm-23.sensio.no') parser.add_argument('--port', help="xmpp server port: %(default)s)", default='843') parser.add_argument('--message', help="message to send: %(default)s)", default="just a stupid message") args = parser.parse_args() class TestBot(ClientXMPP): def __init__(self, jid, password, recipient): ClientXMPP.__init__(self, jid, password, sasl_mech="PLAIN") self.auto_reconnect = False self.recipient = recipient if __name__ == '__main__': if xmpp.connect((args.server, int(args.port)), use_tls=True, use_ssl=False, reattempt=False): msg = Message() msg['type'] = "chat" msg['to'] = args.tojid msg['body'] = args.message msg['id'] = "panel00000002" xmpp.send(msg) xmpp.process(block=True) |
./xmpp-clienttest.py
Thanks --- |