Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begiak bootloops (because of git module?) #593

Open
jonorthwash opened this issue Nov 27, 2020 · 6 comments
Open

begiak bootloops (because of git module?) #593

jonorthwash opened this issue Nov 27, 2020 · 6 comments
Labels
bug crucial Things that are crucial (must be fixed within a couple days) modules spontaneous-crash Things pertaining to begiak's annoying spontaneous crashes and part/rejoin cycles

Comments

@jonorthwash
Copy link
Member

Sometimes the git module becomes unstable or something.

Then begiak tries to restart, but gets this error and tries to restart again:

ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 250, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 223, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
    setup_server(phenny)
  File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
    httpd = PortReuseTCPServer(("", PORT), MyHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
    self.server_bind()
  File "/home/begiak/phenny/tools.py", line 123, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

This results in a whole bunch of join/part cycles as begiak repeatedly restarts for ages.

Right before the join/part cycles we get this in the logs:

140.82.115.250 - - [26/Nov/2020 10:34:03] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.01s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/8338482
Content-Length: 11214
Accept: */*
X-GitHub-Delivery: 3f6a6bd6-2fd4-11eb-85a5-5719ec140414
X-GitHub-Event: push
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.250 - - [26/Nov/2020 10:43:41] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.00s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
198.181.163.173 - - [26/Nov/2020 10:54:45] code 400, message Bad request syntax ('\x03\x00\x00\x13\x0eà\x00\x00\x00\x
00\x00\x01\x00\x08\x00\x03\x00\x00\x00')
198.181.163.173 - - [26/Nov/2020 10:54:45] "^C^@^@^S^Nà^@^@^@^@^@^A^@^H^@^C^@^@^@" 400 -
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/8338482
Content-Length: 14051
Accept: */*
X-GitHub-Delivery: e0b2dd10-2fd5-11eb-908a-48df9218dcc6
X-GitHub-Event: issue_comment
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.149 - - [26/Nov/2020 10:55:21] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.08s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/8338482
Content-Length: 15943
Accept: */*
X-GitHub-Delivery: 12303fa0-2fda-11eb-9e1e-0a8c7bc8468e
X-GitHub-Event: fork
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.244 - - [26/Nov/2020 11:25:22] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.08s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/8338482
Content-Length: 12036
Accept: */*
X-GitHub-Delivery: 23a046b6-2fdc-11eb-9efd-f4be5401fa98
X-GitHub-Event: push
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.149 - - [26/Nov/2020 11:40:10] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.01s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
INFO: Nobody PONGed our PING, restarting
INFO: Closed!
WARNING: Disconnected. Reconnecting in 20 seconds...
INFO: Setting up phenny
@jonorthwash jonorthwash added bug crucial Things that are crucial (must be fixed within a couple days) modules spontaneous-crash Things pertaining to begiak's annoying spontaneous crashes and part/rejoin cycles labels Nov 27, 2020
@jonorthwash
Copy link
Member Author

The messages begiak sent me (an admin) are the following (etc.):

(10:35:43) begiak: Error in 'git/auto_start' with input ''
(10:35:44) begiak: OSError: [Errno 98] Address already in use
(10:35:45) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(10:35:46) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(10:35:47) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(10:35:48) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
(10:36:46) begiak: Error in 'git/auto_start' with input ''
(10:36:47) begiak: OSError: [Errno 98] Address already in use
(10:36:48) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(10:36:49) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(10:36:50) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(10:36:51) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
(10:37:50) begiak: Error in 'git/auto_start' with input ''
(10:37:51) begiak: OSError: [Errno 98] Address already in use
(10:37:52) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(10:37:53) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(10:37:54) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(10:37:55) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start

@jonorthwash
Copy link
Member Author

Doing it again!

(2021-01-21 20:26:12) begiak: Error in 'git/auto_start' with input ''
(2021-01-21 20:26:13) begiak: OSError: [Errno 98] Address already in use
(2021-01-21 20:26:14) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(2021-01-21 20:26:15) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(2021-01-21 20:26:16) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(2021-01-21 20:26:17) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
(2021-01-21 20:31:00) begiak: Error in 'git/auto_start' with input ''
(2021-01-21 20:31:01) begiak: OSError: [Errno 98] Address already in use
(2021-01-21 20:31:02) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(2021-01-21 20:31:03) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(2021-01-21 20:31:04) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(2021-01-21 20:31:05) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
(2021-01-21 20:32:03) begiak: Error in 'git/auto_start' with input ''
(2021-01-21 20:32:04) begiak: OSError: [Errno 98] Address already in use
(2021-01-21 20:32:05) begiak: File "/home/begiak/phenny/tools.py", line 123, in server_bind
(2021-01-21 20:32:06) begiak: File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
(2021-01-21 20:32:07) begiak: File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
(2021-01-21 20:32:08) begiak: File "/home/begiak/phenny/modules/git.py", line 450, in auto_start

etc.

And this loop in the logs:

OSError: [Errno 98] Address already in use

INFO: Nobody PONGed our PING, restarting
INFO: Closed!
WARNING: Disconnected. Reconnecting in 20 seconds...
INFO: Setting up phenny

...

INFO: ##ava
ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 250, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 223, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
    setup_server(phenny)
  File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
    httpd = PortReuseTCPServer(("", PORT), MyHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
    self.server_bind()
  File "/home/begiak/phenny/tools.py", line 123, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

INFO: #matxin
INFO: #_u-dep
INFO: #apertium-mentors
ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 250, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 223, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
    setup_server(phenny)
  File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
    httpd = PortReuseTCPServer(("", PORT), MyHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
    self.server_bind()
  File "/home/begiak/phenny/tools.py", line 123, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 250, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 223, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
    setup_server(phenny)
  File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
    httpd = PortReuseTCPServer(("", PORT), MyHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
    self.server_bind()
  File "/home/begiak/phenny/tools.py", line 123, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

Seems to've started around here:

140.82.115.247 - - [21/Jan/2021 05:56:13] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.00s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_nobloc
k
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
114.119.159.160 - - [21/Jan/2021 06:56:33] "GET /robots.txt HTTP/1.1" 405 -
193.29.13.45 - - [21/Jan/2021 07:04:02] code 400, message Bad HTTP/0.9 request t
ype ('\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie:')
193.29.13.45 - - [21/Jan/2021 07:04:02] "^C^@^@/*à^@^@^@^@^@Cookie: mstshash=Adm
inistr" 400 -
71.6.135.131 - - [21/Jan/2021 08:06:09] "GET /status HTTP/1.1" 405 -
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/301c57e
Content-Length: 12068
Accept: */*
X-GitHub-Delivery: fdaea83a-5bc3-11eb-8be9-0c5f8d2881d7
X-GitHub-Event: push
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.241 - - [21/Jan/2021 08:38:10] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.01s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_nobloc
k
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/301c57e
Content-Length: 11589
Accept: */*
X-GitHub-Delivery: c4ff1c38-5bd0-11eb-8ff3-e8cfb967b216
X-GitHub-Event: push
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.155 - - [21/Jan/2021 10:09:38] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.01s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_nobloc
k
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
79.124.62.123 - - [21/Jan/2021 15:00:48] code 400, message Bad HTTP/0.9 request 
type ('\x03\x00\x00/*à\x00\x00\x00\x00\x00Cookie:')
79.124.62.123 - - [21/Jan/2021 15:00:48] "^C^@^@/*à^@^@^@^@^@Cookie: mstshash=Ad
ministr" 400 -
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/301c57e
Content-Length: 12364
Accept: */*
X-GitHub-Delivery: 43831d54-5c0b-11eb-9d0d-94ac90ff9060
X-GitHub-Event: push
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.154 - - [21/Jan/2021 17:08:21] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.01s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_nobloc
k
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
DEBUG: payload received; headers: Host: apertium.vm.bytemark.co.uk:1234
User-Agent: GitHub-Hookshot/301c57e
Content-Length: 15683
Accept: */*
X-GitHub-Delivery: 0e8109c0-5c0d-11eb-8eb8-2ffa20278e0e
X-GitHub-Event: issue_comment
X-GitHub-Hook-ID: 3722902
X-GitHub-Hook-Installation-Target-ID: 4594256
X-GitHub-Hook-Installation-Target-Type: organization
content-type: application/x-www-form-urlencoded
Connection: close


140.82.115.150 - - [21/Jan/2021 17:21:11] "POST / HTTP/1.1" 200 -
DEBUG: responded '200' in 0.08s
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_nobloc
k
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 411, in handle_one_request
    self.wfile.flush() #actually send the response if not already done.
ValueError: I/O operation on closed file.
89.248.165.52 - - [21/Jan/2021 20:40:51] code 400, message Bad request syntax ('
\x03\x00\x00\x13\x0eà\x00\x00\x00\x00\x00\x01\x00\x08\x00\x02\x00\x00\x00')
89.248.165.52 - - [21/Jan/2021 20:40:51] "^C^@^@^S^Nà^@^@^@^@^@^A^@^H^@^B^@^@^@"
 400 -
114.119.137.128 - - [22/Jan/2021 01:16:57] "GET /robots.txt HTTP/1.1" 405 -
INFO: Nobody PONGed our PING, restarting
INFO: Closed!
WARNING: Disconnected. Reconnecting in 20 seconds...
INFO: Setting up phenny
INFO: Registered modules: admin, alias, apertium_wiki, apertium_wikistats, apert
iumchill, apy, away, botfun, botsnack, calc, choose, clock, codepoints, commit, 
eightball, eleda, fcc, fs_quotes, gci, git, greeting, head, hs, info, iso639, is
sue, linx, logger, mailing_list, more, noexceptions, nsfw, ping, queue, reload, 
remind, sasl, search, seen, sfissues, startup, tell, urbandict, weather, weirdfu
n, whois, wiki_count, wikipedia, wiktionary
DEBUG: Binding module 'clock' command 'f_time'
DEBUG: Binding module 'clock' command 'f_time3'
DEBUG: Binding module 'clock' command 'tz'
DEBUG: Binding module 'clock' command 'yi'

...

DEBUG: Binding module 'choose' command 'choose'
INFO: Connecting to irc.freenode.net:6667...
INFO: connected!
INFO: Authorizing using SASL...
INFO: #apertium
ERROR: Traceback (most recent call last):
  File "/home/begiak/phenny/bot.py", line 250, in call
    rephrase_errors(func, phenny, input)
  File "/home/begiak/phenny/tools.py", line 223, in rephrase_errors
    return fn(*args, **kw)
  File "/home/begiak/phenny/modules/git.py", line 450, in auto_start
    setup_server(phenny)
  File "/home/begiak/phenny/modules/git.py", line 439, in setup_server
    httpd = PortReuseTCPServer(("", PORT), MyHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
    self.server_bind()
  File "/home/begiak/phenny/tools.py", line 123, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

INFO: #hfst

@mr-martian
Copy link

So it's trying to connect to port 1234 which is still in use for some reason. The total duct tape option that comes to mind is adding one of the commands listed at https://stackoverflow.com/questions/11583562/how-to-kill-a-process-running-on-particular-port-in-linux in start_bot() in init.sh

@jonorthwash
Copy link
Member Author

So it's trying to connect to port 1234 which is still in use for some reason.

Because it's not properly destroyed on shut down / whatever crash is occurring. I think it has to do with the fact that it's running in a separate thread that begiak loses track of.

@mr-martian
Copy link

Just ran into this issue in a different program. Turns out after a process terminates, there's a delay of 30-60 seconds before the OS marks the port as available again.

@jonorthwash
Copy link
Member Author

But that should mean that on the 2nd or 3rd restart, it should work fine, which it obviously doesn't...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crucial Things that are crucial (must be fixed within a couple days) modules spontaneous-crash Things pertaining to begiak's annoying spontaneous crashes and part/rejoin cycles
Projects
None yet
Development

No branches or pull requests

2 participants