afra / v4runa

v4runa - our afra bot on #afra@hackint
0 stars 0 forks source link

v4runa doesn't reconnect to IRC #4

Open lynxis opened 2 years ago

lynxis commented 2 years ago

v4runa doesn't reconnect to IRC.

Jul 13 22:37:23 afra pipenv[3437969]: INFO:v4runa:updating spaceapi to state 2
Jul 13 22:37:24 afra pipenv[3437969]: INFO:v4runa:The space is now closed. With target=None
Jul 13 23:42:45 afra pipenv[3437969]: WARNING:MyOwnBot:hackint:>> Receive timeout reached, sending ping to check connection state...
Jul 14 01:58:43 afra pipenv[3437969]: ERROR:MyOwnBot:hackint:Failed to execute on_raw_ping handler.
Jul 14 01:58:43 afra pipenv[3437969]: Traceback (most recent call last):
Jul 14 01:58:43 afra pipenv[3437969]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 422, in on_raw
Jul 14 01:58:43 afra pipenv[3437969]:     await handler(message)
Jul 14 01:58:43 afra pipenv[3437969]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 703, in on_raw_ping
Jul 14 01:58:43 afra pipenv[3437969]:     await self.rawmsg('PONG', *message.params)
Jul 14 01:58:43 afra pipenv[3437969]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 01:58:43 afra pipenv[3437969]:     await self._send(message)
Jul 14 01:58:43 afra pipenv[3437969]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 01:58:43 afra pipenv[3437969]:     await self.connection.send(input)
Jul 14 01:58:43 afra pipenv[3437969]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 01:58:43 afra pipenv[3437969]:     await self.writer.drain()
Jul 14 01:58:43 afra pipenv[3437969]:   File "/usr/lib/python3.9/asyncio/streams.py", line 387, in drain
Jul 14 01:58:43 afra pipenv[3437969]:     await self._protocol._drain_helper()
Jul 14 01:58:43 afra pipenv[3437969]:   File "/usr/lib/python3.9/asyncio/streams.py", line 190, in _drain_helper
Jul 14 01:58:43 afra pipenv[3437969]:     raise ConnectionResetError('Connection lost')
Jul 14 01:58:43 afra pipenv[3437969]: ConnectionResetError: Connection lost
Jul 14 01:58:45 afra pipenv[3516069]: INFO:transitions.core:Finished processing state new exit callbacks.
Jul 14 01:58:45 afra pipenv[3516069]: INFO:transitions.core:Finished processing state connected enter callbacks.
Jul 14 01:58:45 afra pipenv[3516069]: INFO:v4runa:mqtt: connected
Jul 14 04:29:32 afra pipenv[3516069]: WARNING:MyOwnBot:hackint:>> Receive timeout reached, sending ping to check connection state...
Jul 14 04:29:40 afra pipenv[3516069]: ERROR:MyOwnBot:hackint:Failed to execute on_raw_ping handler.
Jul 14 04:29:40 afra pipenv[3516069]: Traceback (most recent call last):
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 422, in on_raw
Jul 14 04:29:40 afra pipenv[3516069]:     await handler(message)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 703, in on_raw_ping
Jul 14 04:29:40 afra pipenv[3516069]:     await self.rawmsg('PONG', *message.params)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 04:29:40 afra pipenv[3516069]:     await self._send(message)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 04:29:40 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 04:29:40 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 04:29:40 afra pipenv[3516069]:     raise exc
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
Jul 14 04:29:40 afra pipenv[3516069]:     data = self._sock.recv(self.max_size)
Jul 14 04:29:40 afra pipenv[3516069]: ConnectionResetError: [Errno 104] Connection reset by peer
Jul 14 04:29:40 afra pipenv[3516069]: ERROR:asyncio:Task exception was never retrieved
Jul 14 04:29:40 afra pipenv[3516069]: future: <Task finished name='Task-15' coro=<BasicClient.handle_forever() done, defined at /home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py:363> exception=ConnectionResetError(104, 'Connection reset by peer')>
Jul 14 04:29:40 afra pipenv[3516069]: Traceback (most recent call last):
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 367, in handle_forever
Jul 14 04:29:40 afra pipenv[3516069]:     data = await self.connection.recv(timeout=self.READ_TIMEOUT)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 115, in recv
Jul 14 04:29:40 afra pipenv[3516069]:     return await asyncio.wait_for(self.reader.readline(), timeout=timeout)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
Jul 14 04:29:40 afra pipenv[3516069]:     return fut.result()
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
Jul 14 04:29:40 afra pipenv[3516069]:     line = await self.readuntil(sep)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 577, in readuntil
Jul 14 04:29:40 afra pipenv[3516069]:     raise self._exception
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 422, in on_raw
Jul 14 04:29:40 afra pipenv[3516069]:     await handler(message)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 703, in on_raw_ping
Jul 14 04:29:40 afra pipenv[3516069]:     await self.rawmsg('PONG', *message.params)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 04:29:40 afra pipenv[3516069]:     await self._send(message)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 04:29:40 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 04:29:40 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 04:29:40 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 04:29:40 afra pipenv[3516069]:     raise exc
Jul 14 04:29:40 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
Jul 14 04:29:40 afra pipenv[3516069]:     data = self._sock.recv(self.max_size)
Jul 14 04:29:40 afra pipenv[3516069]: ConnectionResetError: [Errno 104] Connection reset by peer
Jul 14 15:41:01 afra pipenv[3516069]: INFO:v4runa:mqtt: delivered a message
Jul 14 15:41:01 afra pipenv[3516069]: INFO:v4runa:updating spaceapi to state 1
Jul 14 15:41:02 afra pipenv[3516069]: INFO:v4runa:The space is now open. With target=None
Jul 14 15:41:02 afra pipenv[3516069]: ERROR:asyncio:Task exception was never retrieved
Jul 14 15:41:02 afra pipenv[3516069]: future: <Task finished name='Task-2' coro=<V4runaBot.wait_kick_space() done, defined at /home/afra/v4runa/main.py:237> exception=ConnectionResetError(104, 'Connection reset by peer')>
Jul 14 15:41:02 afra pipenv[3516069]: Traceback (most recent call last):
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 262, in wait_kick_space
Jul 14 15:41:02 afra pipenv[3516069]:     await self.check_state_change()
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 205, in check_state_change
Jul 14 15:41:02 afra pipenv[3516069]:     await self.say_state(ts_state)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 219, in say_state
Jul 14 15:41:02 afra pipenv[3516069]:     await self.irc.notice(channel, "The space is now %s." % human[state])
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/ircv3/ircv3_2.py", line 62, in notice
Jul 14 15:41:02 afra pipenv[3516069]:     await super().notice(target, message)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 360, in notice
Jul 14 15:41:02 afra pipenv[3516069]:     await self.rawmsg('NOTICE', target, chunk)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 15:41:02 afra pipenv[3516069]:     await self._send(message)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 15:41:02 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 15:41:02 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 15:41:02 afra pipenv[3516069]:     raise exc
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 367, in handle_forever
Jul 14 15:41:02 afra pipenv[3516069]:     data = await self.connection.recv(timeout=self.READ_TIMEOUT)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 115, in recv
Jul 14 15:41:02 afra pipenv[3516069]:     return await asyncio.wait_for(self.reader.readline(), timeout=timeout)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
Jul 14 15:41:02 afra pipenv[3516069]:     return fut.result()
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
Jul 14 15:41:02 afra pipenv[3516069]:     line = await self.readuntil(sep)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 577, in readuntil
Jul 14 15:41:02 afra pipenv[3516069]:     raise self._exception
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 422, in on_raw
Jul 14 15:41:02 afra pipenv[3516069]:     await handler(message)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 703, in on_raw_ping
Jul 14 15:41:02 afra pipenv[3516069]:     await self.rawmsg('PONG', *message.params)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 15:41:02 afra pipenv[3516069]:     await self._send(message)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 15:41:02 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 15:41:02 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 15:41:02 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 15:41:02 afra pipenv[3516069]:     raise exc
Jul 14 15:41:02 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
Jul 14 15:41:02 afra pipenv[3516069]:     data = self._sock.recv(self.max_size)
Jul 14 15:41:02 afra pipenv[3516069]: ConnectionResetError: [Errno 104] Connection reset by peer
Jul 14 15:56:59 afra pipenv[3516069]: INFO:v4runa:updating spaceapi to state 2
Jul 14 15:56:59 afra pipenv[3516069]: INFO:v4runa:The space is now closed. With target=None
Jul 14 15:56:59 afra pipenv[3516069]: ERROR:v4runa:Failed to check state change
Jul 14 15:56:59 afra pipenv[3516069]: Traceback (most recent call last):
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 232, in check_room_status
Jul 14 15:56:59 afra pipenv[3516069]:     await self.check_state_change()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 205, in check_state_change
Jul 14 15:56:59 afra pipenv[3516069]:     await self.say_state(ts_state)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 219, in say_state
Jul 14 15:56:59 afra pipenv[3516069]:     await self.irc.notice(channel, "The space is now %s." % human[state])
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/ircv3/ircv3_2.py", line 62, in notice
Jul 14 15:56:59 afra pipenv[3516069]:     await super().notice(target, message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 360, in notice
Jul 14 15:56:59 afra pipenv[3516069]:     await self.rawmsg('NOTICE', target, chunk)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 15:56:59 afra pipenv[3516069]:     await self._send(message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 15:56:59 afra pipenv[3516069]:     raise exc
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 262, in wait_kick_space
Jul 14 15:56:59 afra pipenv[3516069]:     await self.check_state_change()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 205, in check_state_change
Jul 14 15:56:59 afra pipenv[3516069]:     await self.say_state(ts_state)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/v4runa/main.py", line 219, in say_state
Jul 14 15:56:59 afra pipenv[3516069]:     await self.irc.notice(channel, "The space is now %s." % human[state])
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/ircv3/ircv3_2.py", line 62, in notice
Jul 14 15:56:59 afra pipenv[3516069]:     await super().notice(target, message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 360, in notice
Jul 14 15:56:59 afra pipenv[3516069]:     await self.rawmsg('NOTICE', target, chunk)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 15:56:59 afra pipenv[3516069]:     await self._send(message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 15:56:59 afra pipenv[3516069]:     raise exc
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 367, in handle_forever
Jul 14 15:56:59 afra pipenv[3516069]:     data = await self.connection.recv(timeout=self.READ_TIMEOUT)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 115, in recv
Jul 14 15:56:59 afra pipenv[3516069]:     return await asyncio.wait_for(self.reader.readline(), timeout=timeout)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
Jul 14 15:56:59 afra pipenv[3516069]:     return fut.result()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 540, in readline
Jul 14 15:56:59 afra pipenv[3516069]:     line = await self.readuntil(sep)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 577, in readuntil
Jul 14 15:56:59 afra pipenv[3516069]:     raise self._exception
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 422, in on_raw
Jul 14 15:56:59 afra pipenv[3516069]:     await handler(message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 703, in on_raw_ping
Jul 14 15:56:59 afra pipenv[3516069]:     await self.rawmsg('PONG', *message.params)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 312, in rawmsg
Jul 14 15:56:59 afra pipenv[3516069]:     await self._send(message)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 361, in _send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.connection.send(input)
Jul 14 15:56:59 afra pipenv[3516069]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 112, in send
Jul 14 15:56:59 afra pipenv[3516069]:     await self.writer.drain()
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/streams.py", line 375, in drain
Jul 14 15:56:59 afra pipenv[3516069]:     raise exc
Jul 14 15:56:59 afra pipenv[3516069]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 856, in _read_ready__data_received
Jul 14 15:56:59 afra pipenv[3516069]:     data = self._sock.recv(self.max_size)
Jul 14 15:56:59 afra pipenv[3516069]: ConnectionResetError: [Errno 104] Connection reset by peer
lynxis commented 2 years ago

in theory pydle should do this, but it doesn't. maybe override on_disconnect() of myownbot class to allow this.

lynxis commented 1 year ago

Needs further investigation. It might be fixed by now.

lynxis commented 11 months ago

git rev: fc1ae2d5d1251da23340bed3d6f6f0a1ab183891

Oct 20 02:29:29 afra pipenv[2248894]: ERROR:asyncio:Task exception was never retrieved
Oct 20 02:29:29 afra pipenv[2248894]: future: <Task finished name='Task-15' coro=<BasicClient.handle_forever() done, defined at /home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py:363> exception=TimeoutError(110, "Connect call failed ('176.56.239.136', 6697)")>
Oct 20 02:29:29 afra pipenv[2248894]: Traceback (most recent call last):
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 380, in handle_forever
Oct 20 02:29:29 afra pipenv[2248894]:     await self.disconnect(expected=False)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 136, in disconnect
Oct 20 02:29:29 afra pipenv[2248894]:     await self._disconnect(expected)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 146, in _disconnect
Oct 20 02:29:29 afra pipenv[2248894]:     await self.on_disconnect(expected)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 338, in on_disconnect
Oct 20 02:29:29 afra pipenv[2248894]:     await self.connect(reconnect=True)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/tls.py", line 35, in connect
Oct 20 02:29:29 afra pipenv[2248894]:     return await super().connect(hostname, port, tls=tls, **kwargs)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/rfc1459/client.py", line 190, in connect
Oct 20 02:29:29 afra pipenv[2248894]:     await super().connect(hostname, port, **kwargs)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/client.py", line 124, in connect
Oct 20 02:29:29 afra pipenv[2248894]:     await self._connect(hostname=hostname, port=port, reconnect=reconnect, **kwargs)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/features/tls.py", line 54, in _connect
Oct 20 02:29:29 afra pipenv[2248894]:     await self.connection.connect()
Oct 20 02:29:29 afra pipenv[2248894]:   File "/home/afra/.local/share/virtualenvs/v4runa-mmIZGijq/lib/python3.9/site-packages/pydle/connection.py", line 48, in connect
Oct 20 02:29:29 afra pipenv[2248894]:     (self.reader, self.writer) = await asyncio.open_connection(
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/streams.py", line 52, in open_connection
Oct 20 02:29:29 afra pipenv[2248894]:     transport, _ = await loop.create_connection(
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
Oct 20 02:29:29 afra pipenv[2248894]:     raise exceptions[0]
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
Oct 20 02:29:29 afra pipenv[2248894]:     sock = await self._connect_sock(
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
Oct 20 02:29:29 afra pipenv[2248894]:     await self.sock_connect(sock, address)
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
Oct 20 02:29:29 afra pipenv[2248894]:     return await fut
Oct 20 02:29:29 afra pipenv[2248894]:   File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
Oct 20 02:29:29 afra pipenv[2248894]:     raise OSError(err, f'Connect call failed {address}')
Oct 20 02:29:29 afra pipenv[2248894]: TimeoutError: [Errno 110] Connect call failed ('176.56.239.136', 6697)
Oct 20 02:30:01 afra pipenv[2248894]: INFO:v4runa:mqtt: delivered a message
Oct 20 02:31:01 afra pipenv[2248894]: INFO:v4runa:mqtt: delivered a message
lynxis commented 11 months ago

It looks the exception comes from pydle. I've setup an exception handler and hope this will catch at least those exception. We could ignore the auto-reconnect of pydle and implement it in our code. The exception handler will just exit v4runa and systemd should restart v4runa afterwards.