{"action":"closed","issue":{"url":"https://api.github.com/repos/GLolol/PyLink/issues/183","repository_url":"https://api.github.com/repos/GLolol/PyLink","labels_url":"https://api.github.com/repos/GLolol/PyLink/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/GLolol/PyLink/issues/183/comments","events_url":"https://api.github.com/repos/GLolol/PyLink/issues/183/events","html_url":"https://github.com/GLolol/PyLink/issues/183","id":142688314,"number":183,"title":"relay: cascade of errors when networks disconnect too often","user":{"login":"GLolol","id":4644601,"avatar_url":"https://avatars.githubusercontent.com/u/4644601?v=3","gravatar_id":"","url":"https://api.github.com/users/GLolol","html_url":"https://github.com/GLolol","followers_url":"https://api.github.com/users/GLolol/followers","following_url":"https://api.github.com/users/GLolol/following{/other_user}","gists_url":"https://api.github.com/users/GLolol/gists{/gist_id}","starred_url":"https://api.github.com/users/GLolol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GLolol/subscriptions","organizations_url":"https://api.github.com/users/GLolol/orgs","repos_url":"https://api.github.com/users/GLolol/repos","events_url":"https://api.github.com/users/GLolol/events{/privacy}","received_events_url":"https://api.github.com/users/GLolol/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GLolol/PyLink/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/GLolol/PyLink/labels/priority:high","name":"priority:high","color":"eb6420"},{"url":"https://api.github.com/repos/GLolol/PyLink/labels/relay","name":"relay","color":"73531F"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GLolol/PyLink/milestones/14","html_url":"https://github.com/GLolol/PyLink/milestones/v0.7.x","labels_url":"https://api.github.com/repos/GLolol/PyLink/milestones/14/labels","id":1537921,"number":14,"title":"v0.7.x","description":"","creator":{"login":"GLolol","id":4644601,"avatar_url":"https://avatars.githubusercontent.com/u/4644601?v=3","gravatar_id":"","url":"https://api.github.com/users/GLolol","html_url":"https://github.com/GLolol","followers_url":"https://api.github.com/users/GLolol/followers","following_url":"https://api.github.com/users/GLolol/following{/other_user}","gists_url":"https://api.github.com/users/GLolol/gists{/gist_id}","starred_url":"https://api.github.com/users/GLolol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GLolol/subscriptions","organizations_url":"https://api.github.com/users/GLolol/orgs","repos_url":"https://api.github.com/users/GLolol/repos","events_url":"https://api.github.com/users/GLolol/events{/privacy}","received_events_url":"https://api.github.com/users/GLolol/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":14,"state":"open","created_at":"2016-01-23T04:58:15Z","updated_at":"2016-04-14T23:37:59Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-22T15:37:13Z","updated_at":"2016-04-14T23:37:59Z","closed_at":"2016-04-14T23:37:59Z","body":"edit: see https://github.com/GLolol/PyLink/issues/183#issuecomment-203709462 for further details.\r\n\r\n```\r\n00:17 <%PyLink> [WARNING] (apl) Disconnected from IRC: timeout: The read operation timed out\r\n00:17 <%PyLink> [WARNING] (fun) Connection timed out.\r\n00:17 <%PyLink> [ERROR] (fun) Failed to spawn server for 'ovd':\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 260, in getRemoteUser\r\n00:17 <%PyLink>     u = relayusers[(irc.name, user)][remoteirc.name]\r\n00:17 <%PyLink> KeyError: 'fun'\r\n00:17 <%PyLink> During handling of the above exception, another exception occurred:\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 228, in getRemoteSid\r\n00:17 <%PyLink>     sid = relayservers[irc.name][remoteirc.name]\r\n00:17 <%PyLink> KeyError: 'ovd'\r\n00:17 <%PyLink> During handling of the above exception, another exception occurred:\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 236, in getRemoteSid\r\n00:17 <%PyLink>     or remoteirc.name), endburst_delay=3)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 314, in spawnServer\r\n00:17 <%PyLink>     raise ValueError('A server named %r already exists!' % name)\r\n00:17 <%PyLink> ValueError: A server named 'ovd.relay' already exists!\r\n00:17 <%PyLink> [ERROR] (fun) Failed to spawn server for 'ovd':\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 228, in getRemoteSid\r\n00:17 <%PyLink>     sid = relayservers[irc.name][remoteirc.name]\r\n00:17 <%PyLink> KeyError: 'ovd'\r\n00:17 <%PyLink> During handling of the above exception, another exception occurred:\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 236, in getRemoteSid\r\n00:17 <%PyLink>     or remoteirc.name), endburst_delay=3)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 314, in spawnServer\r\n00:17 <%PyLink>     raise ValueError('A server named %r already exists!' % name)\r\n00:17 <%PyLink> ValueError: A server named 'ovd.relay' already exists!\r\n00:17 <%PyLink> [ERROR] (fun) _disconnect: Failed to close/shutdown socket.\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 228, in getRemoteSid\r\n00:17 <%PyLink>     sid = relayservers[irc.name][remoteirc.name]\r\n00:17 <%PyLink> KeyError: 'ovd'\r\n00:17 <%PyLink> During handling of the above exception, another exception occurred:\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 236, in getRemoteSid\r\n00:17 <%PyLink>     or remoteirc.name), endburst_delay=3)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 314, in spawnServer\r\n00:17 <%PyLink>     raise ValueError('A server named %r already exists!' % name)\r\n00:17 <%PyLink> ValueError: A server named 'ovd.relay' already exists!\r\n00:17 <%PyLink> During handling of the above exception, another exception occurred:\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/classes.py\", line 306, in disconnect\r\n00:17 <%PyLink>     self.socket.shutdown(socket.SHUT_RDWR)\r\n00:17 <%PyLink>   File \"/usr/lib/python3.4/ssl.py\", line 783, in shutdown\r\n00:17 <%PyLink>     socket.shutdown(self, how)\r\n00:17 <%PyLink> OSError: [Errno 9] Bad file descriptor\r\n00:17 <%PyLink> [ERROR] (apl) Unhandled exception caught in hook <function handle_endburst at 0x7fc47997d378> from plugin \"relay\"\r\n00:17 <%PyLink> Traceback (most recent call last):\r\n00:17 <%PyLink>   File \"/home/gl/pylink/classes.py\", line 396, in callHooks\r\n00:17 <%PyLink>     hook_func(self, numeric, command, parsed_args)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 1174, in handle_endburst\r\n00:17 <%PyLink>     initializeAll(irc)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 44, in initializeAll\r\n00:17 <%PyLink>     initializeChannel(irc, channel)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 413, in initializeChannel\r\n00:17 <%PyLink>     relayJoins(remoteirc, remotechan, rc.users, rc.ts)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 585, in relayJoins\r\n00:17 <%PyLink>     remoteirc.proto.sjoin(rsid, remotechan, queued_users, ts=ts)\r\n00:17 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 118, in sjoin\r\n00:17 <%PyLink>     namelist.append(','.join(userpair))\r\n00:17 <%PyLink> TypeError: sequence item 1: expected str instance, NoneType found\r\n00:17 <%PyLink> [ERROR] (apl) The offending hook data was: ['168', 'ENDBURST', {'ts': 1458631077}]\r\n00:18 <%PyLink> [ERROR] (fun) Unhandled exception caught in hook <function handle_endburst at 0x7fc47997d378> from plugin \"relay\"\r\n00:18 <%PyLink> Traceback (most recent call last):\r\n00:18 <%PyLink>   File \"/home/gl/pylink/classes.py\", line 396, in callHooks\r\n00:18 <%PyLink>     hook_func(self, numeric, command, parsed_args)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 1174, in handle_endburst\r\n00:18 <%PyLink>     initializeAll(irc)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 44, in initializeAll\r\n00:18 <%PyLink>     initializeChannel(irc, channel)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 413, in initializeChannel\r\n00:18 <%PyLink>     relayJoins(remoteirc, remotechan, rc.users, rc.ts)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 586, in relayJoins\r\n00:18 <%PyLink>     relayModes(irc, remoteirc, getRemoteSid(irc, remoteirc), channel, irc.channels[channel].modes)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 728, in relayModes\r\n00:18 <%PyLink>     remoteirc.proto.mode(rsid, remotechan, supported_modes)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 166, in mode\r\n00:18 <%PyLink>     raise LookupError('No such PyLink client/server exists.')\r\n00:18 <%PyLink> LookupError: No such PyLink client/server exists.\r\n00:18 <%PyLink> [ERROR] (fun) The offending hook data was: ['877', 'ENDBURST', {'ts': 1458631080}]\r\n00:18 <%PyLink> [WARNING] (ecode) No data received, disconnecting!\r\n00:18 <%PyLink> [ERROR] (ecode) Unhandled exception caught in hook <function handle_endburst at 0x7fc47997d378> from plugin \"relay\"\r\n00:18 <%PyLink> Traceback (most recent call last):\r\n00:18 <%PyLink>   File \"/home/gl/pylink/classes.py\", line 396, in callHooks\r\n00:18 <%PyLink>     hook_func(self, numeric, command, parsed_args)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 1174, in handle_endburst\r\n00:18 <%PyLink>     initializeAll(irc)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 47, in initializeAll\r\n00:18 <%PyLink>     initializeChannel(irc, channel)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 413, in initializeChannel\r\n00:18 <%PyLink>     relayJoins(remoteirc, remotechan, rc.users, rc.ts)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 586, in relayJoins\r\n00:18 <%PyLink>     relayModes(irc, remoteirc, getRemoteSid(irc, remoteirc), channel, irc.channels[channel].modes)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 728, in relayModes\r\n00:18 <%PyLink>     remoteirc.proto.mode(rsid, remotechan, supported_modes)\r\n00:18 <%PyLink>   File \"/home/gl/pylink/protocols/inspircd.py\", line 166, in mode\r\n00:18 <%PyLink> LookupError: No such PyLink client/server exists.\r\n00:18 <%PyLink> [ERROR] (ecode) The offending hook data was: ['0UH', 'ENDBURST', {'ts': 1458631093}]\r\n02:00 <%PyLink> [ERROR] (ovd) Unhandled exception caught in hook <function handle_messages at 0x7fc47997be18> from plugin \"relay\"\r\n02:00 <%PyLink> Traceback (most recent call last):\r\n02:00 <%PyLink>   File \"/home/gl/pylink/classes.py\", line 396, in callHooks\r\n02:00 <%PyLink>     hook_func(self, numeric, command, parsed_args)\r\n02:00 <%PyLink>   File \"/home/gl/pylink/plugins/relay.py\", line 878, in handle_messages\r\n02:00 <%PyLink>     remoteirc.proto.message(user, real_target, text)\r\n02:00 <%PyLink>   File \"/home/gl/pylink/protocols/ts6_common.py\", line 100, in message\r\n02:00 <%PyLink>     raise LookupError('No such PyLink client exists.')\r\n02:00 <%PyLink> LookupError: No such PyLink client exists.\r\n02:00 <%PyLink> [ERROR] (ovd) The offending hook data was: ['1MLAAAAQQ', 'PRIVMSG', {'ts': 1458637247, 'text': '\\x02[\\x0302freenode\\x03]\\x02 -\\x0309doge\\x03 is now known as -\\x0312dogeball\\x03', 'target': '#chat'}]\r\n```"}}