aioxmpp icon indicating copy to clipboard operation
aioxmpp copied to clipboard

MUC: auto-rejoin on 333 kick (kick due to technical problems)

Open ge0rg opened this issue 5 years ago • 1 comments

When an aioxmpp bot gets kicked from a MUC for technical reasons (status 333), it doesn't attempt to rejoin the MUC:

2020-04-19 23:58:57,243 DEBUG aioxmpp.node.Client.XMLStream RECV b"<presence to='bot@domain/FKZT20Np' xml:lang='en' from='[email protected]/aioxmppbot' type='unavailable'><status>Kicked: remote server not found: Server-to-server connection failed: DNS resolution failed</status><x xmlns='http://jabber.org/protocol/muc#user'><status code='333'/><item role='none' affiliation='member' jid='bot@domain/FKZT20Np'/><status code='110'/></x></presence><iq to='bot@domain/FKZT20Np' type='error' from='[email protected]/aioxmppbot' id=':YYvsJRq1VNJH1yxND4Yb' xml:lang='en'><error type='cancel'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>You are not currently connected to this chat</text></error></iq><iq to='bot@domain/FKZT20Np' type='error' from='[email protected]/aioxmppbot' id=':utYw6nlv2e8MriZ3OO9r' xml:lang='en'><error type='cancel'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>You are not currently connected to this chat</text></error></iq><r xmlns='urn:xmpp:sm:3'/>"
2020-04-19 23:58:57,288 DEBUG aioxmpp.StanzaStream incoming presence: <presence from='[email protected]/aioxmppbot' to='bot@domain/FKZT20Np' id=None type=<PresenceType.UNAVAILABLE: 'unavailable'>>
2020-04-19 23:58:57,290 DEBUG aioxmpp.node.Client.muc.MUCClient [email protected]: inbound muc user presence <presence from='[email protected]/aioxmppbot' to='bot@domain/FKZT20Np' id=None type=<PresenceType.UNAVAILABLE: 'unavailable'>>
2020-04-19 23:58:57,290 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: request to enable monitoring
2020-04-19 23:58:57,291 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: request to stop pinger
2020-04-19 23:58:57,292 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: sending cancel signal
2020-04-19 23:58:57,293 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: transition to fresh
2020-04-19 23:58:57,293 DEBUG aioxmpp.node.Client.muc.MUCClient [email protected]: is self-presence
2020-04-19 23:58:57,295 DEBUG aioxmpp.node.Client.muc.MUCClient [email protected]: we left the MUC. reason=None
2020-04-19 23:58:57,296 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: disabled monitoring
2020-04-19 23:58:57,296 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: request to stop pinger
2020-04-19 23:58:57,297 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: already stopped
2020-04-19 23:58:57,301 DEBUG aioxmpp.node.Client.muc.MUCClient.MUCMonitor [email protected]/aioxmppbot: pinger exited
Traceback (most recent call last):
  File "/usr/src/aioxmpp/aioxmpp/muc/self_ping.py", line 288, in _pinger
    return_when=asyncio.FIRST_COMPLETED,
  File "/usr/lib/python3.5/asyncio/tasks.py", line 355, in wait
    return (yield from _wait(fs, timeout, return_when, loop))
  File "/usr/lib/python3.5/asyncio/tasks.py", line 438, in _wait
    yield from waiter
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 285, in result
    raise CancelledError
concurrent.futures._base.CancelledError
2020-04-19 23:58:57,304 DEBUG aioxmpp.StanzaStream incoming iq: <iq from='[email protected]/aioxmppbot' to='bot@domain/FKZT20Np' id=':YYvsJRq1VNJH1yxND4Yb' type=<IQType.ERROR: 'error'> error=<not-acceptable type=<ErrorType.CANCEL: 'cancel'> text='You are not currently connected to this chat'>>
2020-04-19 23:58:57,305 DEBUG aioxmpp.StanzaStream iq is response
2020-04-19 23:58:57,305 WARNING aioxmpp.StanzaStream unexpected IQ response: from=JID(localpart='channel', domain='chat.yax.im', resource='aioxmppbot'), id=':YYvsJRq1VNJH1yxND4Yb'
2020-04-19 23:58:57,307 DEBUG aioxmpp.StanzaStream incoming iq: <iq from='[email protected]/aioxmppbot' to='bot@domain/FKZT20Np' id=':utYw6nlv2e8MriZ3OO9r' type=<IQType.ERROR: 'error'> error=<not-acceptable type=<ErrorType.CANCEL: 'cancel'> text='You are not currently connected to this chat'>>
2020-04-19 23:58:57,308 DEBUG aioxmpp.StanzaStream iq is response
2020-04-19 23:58:57,308 WARNING aioxmpp.StanzaStream unexpected IQ response: from=JID(localpart='channel', domain='chat.yax.im', resource='aioxmppbot'), id=':utYw6nlv2e8MriZ3OO9r'
2020-04-19 23:58:57,310 DEBUG aioxmpp.StanzaStream received SM request: <aioxmpp.nonza.SMRequest object at 0xb27b8f4c>
2020-04-19 23:58:57,310 DEBUG aioxmpp.StanzaStream sending SM ack: <aioxmpp.nonza.SMAcknowledgement counter=257 at 0xb27481ec>
2020-04-19 23:58:57,312 DEBUG aioxmpp.node.Client.XMLStream SENT b'<a xmlns="urn:xmpp:sm:3" h="257"/>'
2020-04-19 23:58:57,314 DEBUG aioopenssl.trace.fd=7 _write_ready: nothing more to write, removing writer
2020-04-19 23:59:57,284 DEBUG aioxmpp.StanzaStream XMLStream has reached dead-time soft limit, sending ping
2020-04-19 23:59:57,286 DEBUG aioxmpp.node.Client.XMLStream SENT b'<r xmlns="urn:xmpp:sm:3"/>'
2020-04-19 23:59:57,289 DEBUG aioopenssl.trace.fd=7 _write_ready: nothing more to write, removing writer
2020-04-19 23:59:57,290 DEBUG aioxmpp.node.Client.XMLStream RECV b"<a xmlns='urn:xmpp:sm:3' h='10'/>"
2020-04-19 23:59:57,293 DEBUG aioxmpp.StanzaStream received SM ack: <aioxmpp.nonza.SMAcknowledgement counter=10 at 0xb27b86ec>
2020-04-19 23:59:57,294 DEBUG aioxmpp.StanzaStream sm_ack(10)
2020-04-19 23:59:57,295 DEBUG aioxmpp.StanzaStream sm_ack: to drop 0, unacked: 0

ge0rg avatar Apr 20 '20 11:04 ge0rg

Related: #315

horazont avatar Apr 20 '20 11:04 horazont