0

When using redis-py (version 2.8.0) I'm getting this strange error (below). Does anyone have a clue why this might be happening?

return self.execute_command('GET', name)
File "..../lib/python2.7/site-packages/redis/client.py", line 394, in execute_command
return self.parse_response(connection, command_name, **options)
File "..../python2.7/site-packages/redis/client.py", line 404, in parse_response
response = connection.read_response()
File ".../python2.7/site-packages/redis/connection.py", line 316, in read_response
    raise response
ResponseError: unknown command '502'

Redis server version: 2.2.12, tried setting up redis-server to use unix socket and TCP, also tried downgrading redis-py module to 2.4, always get the same error.

With memcached cache engine I don't see anything like this.

Thanks.

Evgeny
  • 10,698
  • 9
  • 60
  • 70
  • 502 is the HTTP Response code for Bad Gateway. It sounds like you are getting a Bad Gateway error but then 502 is not one of the ones they have defined in the ResponseError Exception class. – chucksmash Oct 31 '13 at 20:16
  • Right and I'm using unix socket to connect with the server (at least the socket path is specified in the redis config via django settings.py file). – Evgeny Oct 31 '13 at 20:19

1 Answers1

1

I encountered a very similar error in two setups I had as well. Upgrading both redis-server and the redis python packages worked for me.

Mine was also in redis/connection.py, in read_response, except with the error ResponseError: ERR unknown command '2014-06-09'

I was running redis-server 2.8.4-2 on Ubuntu and Python/2.7.6/ , with the python redis package v 2.8.0.

Also encountered this with [homebrew] redis-server 2.6.16 on Mac OS X , with Python/2.7.6/ , with both the python redis package versions 2.8.0 and 2.10.1.

It wasn't until I upgraded both redis-server to 2.8.0 and python redis package to 2.10.1, that the unknown command error went away.

HeyWatchThis
  • 21,241
  • 6
  • 33
  • 41