opentimestamps/opentimestamps-server

Finney crash

RCasatta opened this issue · 1 comments

Finney which was running cb25ede9 wasn't timestamping after this happened in the log:

File "/home/ots/opentimestamps-server/otsserver/stamper.py", line 464, in __loop
                      self.__do_bitcoin()
                    File "/home/ots/opentimestamps-server/otsserver/stamper.py", line 305, in __do_bitcoin
                      block = proxy.getblock(block_hash)
                    File "/home/ots/.local/lib/python3.5/site-packages/bitcoin/rpc.py", line 442, in getblock
                      r = self._call('getblock', block_hash, False)
                    File "/home/ots/.local/lib/python3.5/site-packages/bitcoin/rpc.py", line 217, in _call
                      self.__conn.request('POST', self.__url.path, postdata, headers)
                    File "/usr/lib/python3.5/http/client.py", line 1106, in request
                      self._send_request(method, url, body, headers)
                    File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
                      self.endheaders(body)
                    File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
                      self._send_output(message_body)
                    File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
                      self.send(message_body)
                    File "/usr/lib/python3.5/http/client.py", line 908, in send
                      self.sock.sendall(data)
                  BrokenPipeError: [Errno 32] Broken pipe

I am not sure why this wasn't a problem before, I am restarting with this fix RCasatta@fcc251a
but I am not convinced.

Ugh, seems to me like we need to rethink all this in favor of some single strategy to restart that thread properly. :(