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

rethinkdb.errors.ReqlDriverError: Unexpected response received. #190

Open
tatiblockchain opened this issue Apr 30, 2020 · 1 comment
Open

Comments

@tatiblockchain
Copy link

I have been struggling with this issue for a while, i have searched online and have not come across any solution. The closest issue to this one - which presented no solution online is this one.

I am running rethinkdb on Python 2.7 on Ubuntu 16. Everything works fine in development, i tried all the tables in development and no issue. But when i introduce wsgi - i start experiencing this error - intermittently. So sometimes it works, sometimes it does not - its quite random, i am never sure when the error will happen. When it does, it happens on random routes, and functions.

This is the full error message - on one route.

Traceback (most recent call last): File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 2464, in __call__ return self.wsgi_app(environ, start_response) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 2450, in wsgi_app response = self.handle_exception(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 272, in error_router return original_handler(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 1867, in handle_exception reraise(exc_type, exc_value, tb) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 269, in error_router return self.handle_error(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 272, in error_router return original_handler(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 269, in error_router return self.handle_error(e) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 468, in wrapper resp = resource(*args, **kwargs) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask/views.py", line 89, in view return self.dispatch_request(*args, **kwargs) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 583, in dispatch_request resp = meth(*args, **kwargs) File "./api/utils/decorators.py", line 22, in func g.user = User.find(user_id) File "./api/models.py", line 25, in find return r.table(cls._table).get(id).run(conn) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/rethinkdb/ast.py", line 146, in run return c._start(self, **global_optargs) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/rethinkdb/net.py", line 749, in _start return self._instance.run_query(q, global_optargs.get("noreply", False)) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/rethinkdb/net.py", line 566, in run_query res = self._read_response(query) File "/home/username/xxxx/xxxxxx/xxxxxxenv/local/lib/python2.7/site-packages/rethinkdb/net.py", line 615, in _read_response raise ReqlDriverError("Unexpected response received.") rethinkdb.errors.ReqlDriverError: Unexpected response received. [pid: 31443|app: 0|req: 1/2] 00.00.00.00 () {38 vars in 714 bytes} [Thu Apr 30 16:36:46 2020] POST /api/v1/testing/view/province => generated 0 bytes in 23 msecs (HTTP/1.1 500) 0 headers in 0 bytes ($

@gabor-boros gabor-boros transferred this issue from rethinkdb/rethinkdb May 4, 2020
@gabor-boros
Copy link
Member

Hello @tatiblockchain,

Thanks for opening this issue. Could you please help me by providing more info about the environment? You wrote that when you develop everything goes well, but when you introduce WSGI the driver is acting weird.

Are you introducing that WSGI locally or is that on a production/public facing server? As I can see in https://github.com/rethinkdb/rethinkdb-python/blob/master/rethinkdb/net.py#L613-L615 this error should be raised if the response is corrupted or not intended for us.

Which version of RethinkDB are you using? Which driver version? Could you please help with other non-sensitive details as well like where the issue happens (locally or a production env for example)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants