Skip to content

Instantly share code, notes, and snippets.

@azmeuk
Created July 19, 2016 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azmeuk/227b8e8f6adf92e08a6ffc2425310d0a to your computer and use it in GitHub Desktop.
Save azmeuk/227b8e8f6adf92e08a6ffc2425310d0a to your computer and use it in GitHub Desktop.
DEBUG selector_events:53 Using selector: EpollSelector
DEBUG callbacks:431 connecting <bound method PresenceManagedClient._handle_stream_established of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <bound method AbstractClient._stream_failure of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <bound method AbstractClient._stream_destroyed of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG node:174 domain gcm.googleapis.com: trying to connect to 'fcm-xmpp.googleapis.com':5236 using <aioxmpp.connector.XMPPOverTLSConnector object at 0x7f52a4c949e8>
DEBUG __init__:295 _initiate_tls called
DEBUG __init__:320 _tls_do_handshake called
DEBUG __init__:328 registering reader for _tls_do_handshake
DEBUG __init__:320 _tls_do_handshake called
DEBUG __init__:328 registering reader for _tls_do_handshake
DEBUG __init__:320 _tls_do_handshake called
DEBUG __init__:328 registering reader for _tls_do_handshake
DEBUG __init__:320 _tls_do_handshake called
INFO security_layer:263 verifying certificate (preverify=1)
INFO security_layer:263 verifying certificate (preverify=1)
INFO security_layer:263 verifying certificate (preverify=1)
INFO security_layer:263 verifying certificate (preverify=1)
DEBUG __init__:328 registering reader for _tls_do_handshake
DEBUG __init__:320 _tls_do_handshake called
DEBUG __init__:262 clearing readers/writers
DEBUG __init__:352 handshake complete
DEBUG __init__:358 post handshake scheduled via callback
DEBUG __init__:376 _tls_post_handshake called
DEBUG protocol:137 SENT b'<?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="gcm.googleapis.com">'
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG protocol:442 RECV b'<stream:stream from="gcm.googleapis.com" id="D4EFC1C6D3C11D4C" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">'
DEBUG protocol:442 RECV b'<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>'
DEBUG node:195 domain gcm.googleapis.com: connection succeeded using <aioxmpp.connector.XMPPOverTLSConnector object at 0x7f52a4c949e8>
INFO __init__:457 attempting PLAIN mechanism
DEBUG protocol:137 SENT b'<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">ADIyNjM4ODE0OTU0MQBBSXphU3lEZE9ZTUx1ZUU2QTRpcHlLa2lYZzlnaDczOTk5Q1FFM00=</auth>'
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG protocol:442 RECV b'<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>'
DEBUG protocol:137 SENT b''
DEBUG protocol:137 SENT b'<?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" to="gcm.googleapis.com">'
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG protocol:442 RECV b'<stream:stream from="gcm.googleapis.com" id="7D3D05319F0CE8AD" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">'
DEBUG protocol:442 RECV b'<stream:features><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>'
DEBUG node:609 negotiating stream (server_can_do_sm=False)
DEBUG callbacks:431 connecting <bound method StanzaStream._xmlstream_failed of <aioxmpp.stream.StanzaStream object at 0x7f52a4c94e80>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG stream:1342 broker task started as <Task pending coro=<StanzaStream._run() running at local.virtualenv/lib/python3.5/site-packages/aioxmpp/stream.py:1429> cb=[StanzaStream._done_handler()]>
DEBUG node:623 binding to resource
DEBUG stream:1146 iq response future registered: from=None, id='x0Q0XqWbUchP+aQOItWwy'
DEBUG stream:1940 sending <iq from=None to=None id='x0Q0XqWbUchP+aQOItWwy' type='set' data=<aioxmpp.rfc6120.Bind object at 0x7f52a4cc82e8>> and waiting for it to be sent
DEBUG stream:1523 enqueued stanza <iq from=None to=None id='x0Q0XqWbUchP+aQOItWwy' type='set' data=<aioxmpp.rfc6120.Bind object at 0x7f52a4cc82e8>> with token <StanzaToken id=0x00007f52a4cc85f8>
DEBUG stream:1960 using token <StanzaToken id=0x00007f52a4cc85f8>
DEBUG stream:975 forwarding stanza to xmlstream: <iq from=None to=None id='x0Q0XqWbUchP+aQOItWwy' type='set' data=<aioxmpp.rfc6120.Bind object at 0x7f52a4cc82e8>>
DEBUG protocol:137 SENT b'<iq id="x0Q0XqWbUchP+aQOItWwy" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></iq>'
DEBUG stream:1943 token <StanzaToken id=0x00007f52a4cc85f8> enters state <StanzaState.SENT_WITHOUT_SM: 3>
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG protocol:442 RECV b'<iq id="x0Q0XqWbUchP+aQOItWwy" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>XXXXXXXXX@gcm.googleapis.com/XXXXXXX</jid></bind></iq>'
DEBUG protocol:442 RECV b' '
DEBUG stream:707 incoming iq: <iq from=None to=None id='x0Q0XqWbUchP+aQOItWwy' type='result' data=<aioxmpp.rfc6120.Bind object at 0x7f52a4cc89e8>>
DEBUG stream:710 iq is response
DEBUG stream:716 iq response delivered to key (None, 'x0Q0XqWbUchP+aQOItWwy')
INFO node:661 bound to jid: XXXXXXXX@gcm.googleapis.com/XXXXXXXXX
DEBUG node:587 remote server announces support for legacy sessions
DEBUG stream:1146 iq response future registered: from=None, id='xJFIccJ2U8qYyUkbFL8iW'
DEBUG stream:1940 sending <iq from=None to=None id='xJFIccJ2U8qYyUkbFL8iW' type='set' data=<aioxmpp.rfc3921.Session object at 0x7f52a4cbb518>> and waiting for it to be sent
DEBUG stream:1523 enqueued stanza <iq from=None to=None id='xJFIccJ2U8qYyUkbFL8iW' type='set' data=<aioxmpp.rfc3921.Session object at 0x7f52a4cbb518>> with token <StanzaToken id=0x00007f52a4cc81d0>
DEBUG stream:1960 using token <StanzaToken id=0x00007f52a4cc81d0>
DEBUG stream:975 forwarding stanza to xmlstream: <iq from=None to=None id='xJFIccJ2U8qYyUkbFL8iW' type='set' data=<aioxmpp.rfc3921.Session object at 0x7f52a4cbb518>>
DEBUG protocol:137 SENT b'<iq id="xJFIccJ2U8qYyUkbFL8iW" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>'
DEBUG stream:1943 token <StanzaToken id=0x00007f52a4cc81d0> enters state <StanzaState.SENT_WITHOUT_SM: 3>
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG protocol:442 RECV b'<iq type="result" id="xJFIccJ2U8qYyUkbFL8iW"/>'
DEBUG stream:707 incoming iq: <iq from=None to=None id='xJFIccJ2U8qYyUkbFL8iW' type='result'>
DEBUG stream:710 iq is response
DEBUG stream:716 iq response delivered to key (None, 'xJFIccJ2U8qYyUkbFL8iW')
DEBUG node:594 legacy session negotiated (upgrade your server!)
DEBUG stream:1523 enqueued stanza <presence from=None to=None id='x+u/tSoTjO43B/iAUyEYt' type=None> with token <StanzaToken id=0x00007f52a4cc87f0>
DEBUG stream:1940 sending <message from=None to=None id=None type='normal'> and waiting for it to be sent
DEBUG stream:1523 enqueued stanza <message from=None to=None id='x7RLOHFQkpxgKdcy56sd7' type='normal'> with token <StanzaToken id=0x00007f52a4cc8128>
DEBUG stream:1960 using token <StanzaToken id=0x00007f52a4cc8128>
DEBUG stream:975 forwarding stanza to xmlstream: <presence from=None to=None id='x+u/tSoTjO43B/iAUyEYt' type=None>
DEBUG protocol:137 SENT b'<presence id="x+u/tSoTjO43B/iAUyEYt"/>'
DEBUG stream:975 forwarding stanza to xmlstream: <message from=None to=None id='x7RLOHFQkpxgKdcy56sd7' type='normal'>
DEBUG protocol:137 SENT b'<message id="x7RLOHFQkpxgKdcy56sd7"><gcm xmlns="google:mobile:data">{"notification": {"title": "Hello", "text": "World"}, "to": "XXXXXXXXXXXXX", "message_id": "c88b05c4-a9c5-48af-9dbb-51fb56cd5758"}</gcm></message>'
DEBUG stream:1943 token <StanzaToken id=0x00007f52a4cc8128> enters state <StanzaState.SENT_WITHOUT_SM: 3>
DEBUG node:767 stopping main task of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>
Stack (most recent call last):
File "aio.py", line 40, in <module>
asyncio.get_event_loop().run_until_complete(main(jid, settings.FCM_API_KEY, settings.RECIPIENT))
File "/usr/lib64/python3.5/asyncio/base_events.py", line 325, in run_until_complete
self.run_forever()
File "/usr/lib64/python3.5/asyncio/base_events.py", line 295, in run_forever
self._run_once()
File "/usr/lib64/python3.5/asyncio/base_events.py", line 1254, in _run_once
handle._run()
File "/usr/lib64/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib64/python3.5/asyncio/tasks.py", line 301, in _wakeup
self._step()
File "/usr/lib64/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "aio.py", line 34, in main
await stream.send_and_wait_for_sent(msg)
File "local.virtualenv/lib/python3.5/site-packages/aioxmpp/node.py", line 1052, in __aexit__
self._client.presence = structs.PresenceState(False)
File "local.virtualenv/lib/python3.5/site-packages/aioxmpp/node.py", line 919, in presence
self._update_presence()
File "local.virtualenv/lib/python3.5/site-packages/aioxmpp/node.py", line 887, in _update_presence
self.stop()
File "local.virtualenv/lib/python3.5/site-packages/aioxmpp/node.py", line 767, in stop
self.logger.debug("stopping main task of %r", self, stack_info=True)
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
INFO node:698 client shutting down (on request)
DEBUG protocol:137 SENT b'</stream:stream>'
DEBUG __init__:503 _write_ready: nothing more to write, removing writer
DEBUG stream:1377 sending stop signal to task
DEBUG stream:1472 task terminating, rescuing stanzas and clearing handlers
DEBUG stream:663 destroying stream state
DEBUG protocol:321 waiting for at most 15 seconds for peer stream footer
ERROR base_events:1090 Fatal read error on STARTTLS transport
protocol: <aioxmpp.protocol.XMLStream object at 0x7f52a4ca76d8>
transport: <aioopenssl.STARTTLSTransport object at 0x7f52a4ca7b38>
Traceback (most recent call last):
File "local.virtualenv/lib/python3.5/site-packages/aioopenssl/__init__.py", line 446, in _read_ready
data = self._sock.recv(self.MAX_SIZE)
File "local.virtualenv/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1321, in recv
self._raise_ssl_error(self._ssl, result)
File "local.virtualenv/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1184, in _raise_ssl_error
raise SysCallError(-1, "Unexpected EOF")
OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')
DEBUG __init__:245 _force_close called
DEBUG __init__:262 clearing readers/writers
DEBUG stream:663 destroying stream state
INFO node:703 stopping stream
ERROR base_events:1090 Task was destroyed but it is pending!
task: <Task pending coro=<XMLStream._stream_footer_timeout() running at local.virtualenv/lib/python3.5/site-packages/aioxmpp/protocol.py:323> wait_for=<Future pending cb=[Task._wakeup()]> cb=[XMLStream._stream_starts_closing.<locals>.<lambda>() at local.virtualenv/lib/python3.5/site-packages/aioxmpp/protocol.py:315]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment