Implement more robust retry logic for directory
At 2013-09-12 10:25:30 Arturo Filastò wrote: Given the fact that the Tor network can sometime be unreliable we should make sure to implement some retry logic also for the fetching of inputs, policies and decks.
This is an example how what currently happens when it fails to download the input once:
[!] Failed to download the input file 37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 601, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 215, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 221, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/endpoints.py", line 110, in dataReceived
return self._wrappedProtocol.dataReceived(data)
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/ometa/protocol.py", line 53, in dataReceived
self._parser.receive(data)
File "/usr/local/lib/python2.7/dist-packages/ometa/tube.py", line 41, in receive
status = self._interp.receive(data)
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 48, in receive
for x in self.next:
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 166, in apply
for x in self._apply(f, ruleName, argvals):
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 104, in _apply
for x in rule():
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 245, in parse_Or
for x in self._eval(subexpr):
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 230, in parse_And
for x in self._eval(subexpr):
File "/usr/local/lib/python2.7/dist-packages/ometa/interp.py", line 423, in parse_Action
val = eval(expr.data, self.globals, self._localsStack[-1])
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/txsocksx/client.py", line 155, in serverResponse
raise e.socks5ErrorMap.get(status)()
txsocksx.errors.TTLExpired:
[!] Failed to start the director
The quick fix would be to inform the user that the they should re-run the test.
This issue was automatically migrated from github issue https://github.com/TheTorProject/ooni-probe/issues/195