lobsters / lobsters-ansible

Ansible playbook for lobste.rs
ISC License
78 stars 25 forks source link

Handle errors crashing irker #50

Closed hmadison closed 3 years ago

hmadison commented 4 years ago

cc: @alanpost

Following errors from the sopel logs seem to be responsible for irker going down.

Dec 02 20:00:16 mockturtle sopel[9909]: Traceback (most recent call last):
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/bot.py", line 470, in call
Dec 02 20:00:16 mockturtle sopel[9909]:     exit_code = func(sopel, trigger)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/var/lib/sopel/modules/irker.py", line 44, in irk
Dec 02 20:00:16 mockturtle sopel[9909]:     bot.say(obj['privmsg'], channel)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/bot.py", line 407, in say
Dec 02 20:00:16 mockturtle sopel[9909]:     self._bot.say(message, destination, max_messages)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/bot.py", line 335, in say
Dec 02 20:00:16 mockturtle sopel[9909]:     self.write(('PRIVMSG', recipient), text)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/bot.py", line 163, in write
Dec 02 20:00:16 mockturtle sopel[9909]:     irc.Bot.write(self, args, text=text)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/irc.py", line 149, in write
Dec 02 20:00:16 mockturtle sopel[9909]:     self.send(temp.encode('utf-8'))
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3/dist-packages/sopel/irc.py", line 263, in _ssl_send
Dec 02 20:00:16 mockturtle sopel[9909]:     result = self.socket.send(data)
Dec 02 20:00:16 mockturtle sopel[9909]:   File "/usr/lib/python3.6/ssl.py", line 946, in send
Dec 02 20:00:16 mockturtle sopel[9909]:     return socket.send(self, data, flags)
Dec 02 20:00:16 mockturtle sopel[9909]: OSError: [Errno 9] Bad file descriptor
Dec 02 20:00:16 mockturtle sopel[9909]: ERROR:sopel.modules.sopel.irc:Exception from wolfe.freenode.net: OSError: [Errno 9] Bad file descriptor (file "/usr/lib/python3.6/ssl.py", line 946, in send) (:wolf
Dec 02 00:57:13 mockturtle sopel[668]: Traceback (most recent call last):
Dec 02 00:57:13 mockturtle sopel[668]:   File "/usr/lib/python3/dist-packages/sopel/bot.py", line 470, in call
Dec 02 00:57:13 mockturtle sopel[668]:     exit_code = func(sopel, trigger)
Dec 02 00:57:13 mockturtle sopel[668]:   File "/var/lib/sopel/modules/irker.py", line 30, in irk
Dec 02 00:57:13 mockturtle sopel[668]:     sock.bind(("127.0.0.1", bot.config.irker.listen_port))
Dec 02 00:57:13 mockturtle sopel[668]: OSError: [Errno 98] Address already in use
hmadison commented 3 years ago

We no longer use irker for the IRC bot.