sirius icon indicating copy to clipboard operation
sirius copied to clipboard

Internal Server Error at alpha.littleprinter.com

Open oschrenk opened this issue 9 years ago • 6 comments

With my Twitter account already connected to the app I get a 'Internal Server Error' when visiting the page.

oschrenk avatar Sep 22 '15 14:09 oschrenk

True, it doesn't work well. Some have had luck by opening a new session and signing in again afterwards. But I think you will be best off by setting up your own instance.

markostamcar avatar Sep 23 '15 08:09 markostamcar

Opening a new session did not work. I also tried revoking the access and signing in again without success.

I guess I will have tro try to setup my own instance, but I ran into some issues on my mac. gevent does not compile on my Mac. Did somebody make this work on a Mac?

oschrenk avatar Sep 23 '15 13:09 oschrenk

Hey @oschrenk , sorry it is late but I just got it running.

You need to change the requiriments.txt and replace the gevent line to: gevent==1.1b5

Then, you need to run the main command a little bit differently too:

gunicorn -k flask_sockets.Worker manage:app -b 0.0.0.0:5002 -w 1

I could run the server successfully on Mac after this. But I keep getting "Internal Error" when trying to login with Twitter.

felippenardi avatar Jan 07 '16 02:01 felippenardi

Ugh. Coming back to this after month didn't improve the situation. Even setting up my own instance with the amazing https://github.com/hako/dockerfiles/tree/master/sirius did not help.

I'm still getting Internal Server Error.

oschrenk avatar May 31 '16 19:05 oschrenk

I have some output though:

19:35:24 web.1  | Traceback (most recent call last):
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 508, in handle_one_response
19:35:24 web.1  |     self.run_application()
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/geventwebsocket/handler.py", line 88, in run_application
19:35:24 web.1  |     return super(WebSocketHandler, self).run_application()
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/gevent/pywsgi.py", line 494, in run_application
19:35:24 web.1  |     self.result = self.application(self.environ, self.start_response)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
19:35:24 web.1  |     return self.wsgi_app(environ, start_response)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask_sockets.py", line 41, in __call__
19:35:24 web.1  |     return self.app(environ, start_response)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/werkzeug/contrib/fixers.py", line 144, in __call__
19:35:24 web.1  |     return self.app(environ, start_response)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
19:35:24 web.1  |     response = self.make_response(self.handle_exception(e))
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
19:35:24 web.1  |     reraise(exc_type, exc_value, tb)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
19:35:24 web.1  |     response = self.full_dispatch_request()
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
19:35:24 web.1  |     rv = self.handle_user_exception(e)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
19:35:24 web.1  |     reraise(exc_type, exc_value, tb)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
19:35:24 web.1  |     rv = self.dispatch_request()
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
19:35:24 web.1  |     return self.view_functions[rule.endpoint](**req.view_args)
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask_oauth.py", line 427, in decorated
19:35:24 web.1  |     data = self.handle_oauth1_response()
19:35:24 web.1  |   File "/usr/lib/python2.7/site-packages/flask_oauth.py", line 379, in handle_oauth1_response
19:35:24 web.1  |     type='invalid_response', data=data)
19:35:24 web.1  | OAuthException: Invalid response from twitter
19:35:24 web.1  | {'GATEWAY_INTERFACE': 'CGI/1.1',
19:35:24 web.1  |  'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
19:35:24 web.1  |  'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
19:35:24 web.1  |  'HTTP_ACCEPT_LANGUAGE': 'en,en-US;q=0.8,de-DE;q=0.6,de;q=0.4',
19:35:24 web.1  |  'HTTP_CACHE_CONTROL': 'max-age=0',
19:35:24 web.1  |  'HTTP_CONNECTION': 'keep-alive',
19:35:24 web.1  |  'HTTP_COOKIE': 'session=.eJwdzEELgjAYgOG_Et_ZSyYehA52UArcFDSYEVKs9o2Z2pyoE_974Xt5bu8CleQQLLB7QgAsFyNxi4nkhUc-ESaWILNY0zhSzPKaueepjC9IcnGE1QEzSmNeumofg0HTqm1kILhB7_NGZeEWx6H7c7pmmOp9Bg5M1ve-h7coXckSnQx0bvo6TKkWpFNRM8N9XX9pGjPF.Ci941w.7szYO5WHECWJfuUiKheu-lUmauo',
19:35:24 web.1  |  'HTTP_DNT': '1',
19:35:24 web.1  |  'HTTP_HOST': '163.172.xxx.xxx:5000',
19:35:24 web.1  |  'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
19:35:24 web.1  |  'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.36 Safari/537.36',
19:35:24 web.1  |  'PATH_INFO': '/twitter/oauth-authorized',
19:35:24 web.1  |  'QUERY_STRING': 'next=http://163.172.xxx.xxx:5000/&oauth_token=s6dnkQAAAAAAdhupAAABVQhPr1Q&oauth_verifier=rn12upaN0jYTRZZ6SeDEHfWrKFQyazSb',
19:35:24 web.1  |  'REMOTE_ADDR': '62.163.154.13',
19:35:24 web.1  |  'REMOTE_PORT': '55243',
19:35:24 web.1  |  'REQUEST_METHOD': 'GET',
19:35:24 web.1  |  'SCRIPT_NAME': '',
19:35:24 web.1  |  'SERVER_NAME': '4c2804955a01',
19:35:24 web.1  |  'SERVER_PORT': '5000',
19:35:24 web.1  |  'SERVER_PROTOCOL': 'HTTP/1.1',
19:35:24 web.1  |  'SERVER_SOFTWARE': 'gevent/1.0.1 gunicorn/19.1.1',
19:35:24 web.1  |  'werkzeug.proxy_fix.orig_http_host': '163.172.xxx.xxx:5000',
19:35:24 web.1  |  'werkzeug.proxy_fix.orig_remote_addr': '62.163.154.13',
19:35:24 web.1  |  'werkzeug.proxy_fix.orig_wsgi_url_scheme': 'http',
19:35:24 web.1  |  'werkzeug.request': <Request 'http://163.172.xxx.xxx:5000/twitter/oauth-authorized?next=http:%2F%2F163.172.xxx.xxx:5000%2F&oauth_token=s6dnkQAAAAAAdhupAAABVQhPr1Q&oauth_verifier=rn12upaN0jYTRZZ6SeDEHfWrKFQyazSb' [GET]>,
19:35:24 web.1  |  'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWraper object at 0x7f949241ad10>,
19:35:24 web.1  |  'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>,
19:35:24 web.1  |  'wsgi.input': <gevent.pywsgi.Input object at 0x7f94918f1c10>,
19:35:24 web.1  |  'wsgi.multiprocess': False,
19:35:24 web.1  |  'wsgi.multithread': True,
19:35:24 web.1  |  'wsgi.run_once': False,
19:35:24 web.1  |  'wsgi.url_scheme': 'http',
19:35:24 web.1  |  'wsgi.version': (1, 0)} failed with OAuthException

oschrenk avatar May 31 '16 19:05 oschrenk

A different error with the same results

OperationalError: (OperationalError) attempt to write a readonly database u'INSERT
 INTO user (created, username) VALUES (?, ?)' ('2016-05-31 20:00:09.479559', u'oschrenk')

Although this might be actually a successful authentication but just a failure on the operational side.

@hako Do you know a bit more about the file system stuff in Docker?

oschrenk avatar May 31 '16 20:05 oschrenk