Closed muellermartin closed 5 years ago
Thank you for your reporting this issue.
Did you check if ooniprobe agent is running (systemctl status ooniprobe
)?
Please note that lepidopter is based on the python version of ooniprobe that is now considered legacy, but not deprecated as there no replacement yet. Feel free to check out the next generation OONI Probe CLI and compile it for the Raspberry Pi.
ooniprobe seems to be running. At least systemctl status ooniprobe
shows Active: active (running)
state and ps aux | grep [o]oniprobe
returns a process: /usr/bin/python /usr/local/bin/ooniprobe-agent start
.
Can you please try using a different browser with/or a clean profile and no plugins?
Good point, I admit that I did not rule this out. But now I've tried to load the website additionally in Firefox Nightly, Safari and Google Chrome – sadly with the same result.
Can you run a test manually from cli?
Example:
root@lepidopter:~# ooniprobe -v manipulation/http_invalid_request_line
Perhaps you can also try to restart ooniprobe service.
I've ran the test as user lepidopter
with following output (seems to be successfull):
Edit: After manually running your suggested test, the web interface still shows the same errors. Restarting ooniprobe via sudo systemctl restart ooniprobe
takes quite a while, but also has no effect on the shown errors (still the same).
It seems that ooniprobe runs OK (though with a different, note that some tests require extra privileges). It may be related to this issue: https://github.com/scrapy/scrapyd/issues/311
Could you please check which version of Twisted are you running (pip list |grep Twisted
)?
lepidopter@lepidopter:~$ pip list |grep Twisted
/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py:163: CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. A future version of cryptography will drop support for it.
utils.CryptographyDeprecationWarning
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Twisted (19.2.1)
Can you try to downgrade the Twisted pip package to an earlier version and restart ooniprobe service?
sudo pip install == 'Twisted==18.7.0' && sudo systemctl restart ooniprobe
I had to remove the double equal before Twisted to make the command work (sudo pip install 'Twisted==18.7.0' && sudo systemctl restart ooniprobe
).
After downgrading from Twisted 19.2.1 to 18.7.0, the dashboard showed the welcome screen with the setup and now everything is reported to work as expected. I guess this issue is resolved – thanks a lot for your help!
I'm going to close this issue, thank you for reporting back.
I've just installed Lepidopter 1.0.0 on a Raspberry Pi B+ and when I open the web interface, I get this error twice as popup:
The ooniprobe Dashboard shows that ooniprobe is not running and that it failed to load decks and recent results.
Using the refresh button on the top right results in the same error messages.
A quick look at the browser's network debugger shows that the requests to
/status
,/deck
,/measurement
and/nettest
are failing with HTTP error code 500.The response for
/status
shows following traceback as result:Click to expand
``` web.Server Traceback (most recent call last): exceptions.AttributeError: 'int' object has no attribute 'splitlines' /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:151 in maybeDeferred 150 try: 151 result = f(*args, **kw) 152 except: /usr/local/lib/python2.7/dist-packages/klein/_app.py:134 in execute_endpoint 133 endpoint_f = self._endpoints[endpoint] 134 return endpoint_f(self._instance, *args, **kwargs) 135 /usr/local/lib/python2.7/dist-packages/klein/_app.py:250 in _f 249 def _f(instance, request, *a, **kw): 250 return _call(instance, f, request, *a, **kw) 251 /usr/local/lib/python2.7/dist-packages/klein/_app.py:55 in _call 54 args = (__klein_instance__,) + args 55 result = __klein_f__(*args, **kwargs) 56 if iscoroutine(result): /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:69 in wrapper 68 raise WebUIError(404, "Invalid XSRF token") 69 return f(instance, request, *a, **kw) 70 /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:278 in api_status 277 def api_status(self, request): 278 return self.render_json(self.status, request) 279 /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:260 in render_json 259 request.setHeader('Content-Type', 'application/json') 260 request.setHeader('Content-Length', len(json_string)) 261 return json_string /usr/local/lib/python2.7/dist-packages/twisted/web/http.py:1271 in setHeader 1270 """ 1271 self.responseHeaders.setRawHeaders(name, [value]) 1272 /usr/local/lib/python2.7/dist-packages/twisted/web/http_headers.py:220 in setRawHeaders 219 encodedValues = [_sanitizeLinearWhitespace(v) 220 for v in self._encodeValues(values)] 221 /usr/local/lib/python2.7/dist-packages/twisted/web/http_headers.py:40 in _sanitizeLinearWhitespace 39 """ 40 return b' '.join(headerComponent.splitlines()) 41 exceptions.AttributeError: 'int' object has no attribute 'splitlines' ```And the other requests (
/deck
,/measurement
and/nettest
) show this traceback as result:Click to expand
``` web.Server Traceback (most recent call last): exceptions.AttributeError: 'int' object has no attribute 'splitlines' /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:151 in maybeDeferred 150 try: 151 result = f(*args, **kw) 152 except: /usr/local/lib/python2.7/dist-packages/klein/_app.py:141 in execute_error_handler 140 """ 141 return handler(self._instance, request, failure) 142 /usr/local/lib/python2.7/dist-packages/klein/_app.py:368 in _f 367 def _f(instance, request, failure): 368 return _call(instance, f, request, failure) 369 /usr/local/lib/python2.7/dist-packages/klein/_app.py:55 in _call 54 args = (__klein_instance__,) + args 55 result = __klein_f__(*args, **kwargs) 56 if iscoroutine(result): /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:69 in wrapper 68 raise WebUIError(404, "Invalid XSRF token") 69 return f(instance, request, *a, **kw) 70 /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:255 in web_ui_error 254 "error_message": error.message 255 }, request) 256 /usr/local/lib/python2.7/dist-packages/ooniprobe-2.3.0-py2.7.egg/ooni/ui/web/server.py:260 in render_json 259 request.setHeader('Content-Type', 'application/json') 260 request.setHeader('Content-Length', len(json_string)) 261 return json_string /usr/local/lib/python2.7/dist-packages/twisted/web/http.py:1271 in setHeader 1270 """ 1271 self.responseHeaders.setRawHeaders(name, [value]) 1272 /usr/local/lib/python2.7/dist-packages/twisted/web/http_headers.py:220 in setRawHeaders 219 encodedValues = [_sanitizeLinearWhitespace(v) 220 for v in self._encodeValues(values)] 221 /usr/local/lib/python2.7/dist-packages/twisted/web/http_headers.py:40 in _sanitizeLinearWhitespace 39 """ 40 return b' '.join(headerComponent.splitlines()) 41 exceptions.AttributeError: 'int' object has no attribute 'splitlines' ```