user1532761
user1532761

Reputation: 39

Heroku: Setting up redis and redisco with flask connection error

I am trying to set up redis while using flask on heroku, I added the redistogo add on via heroku.

It looks like my redistogo instance is running on port 9456: redis://redistogo:asdfasdf:9456

I tried configuring redisco's port like so:

redisco.connection_setup(host='localhost', port=9456)

However, I am getting a connection error

My heroku logs look like this:

 2014-02-10T23:18:12.131796+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/redis/connection.py", line 253, in connect
    2014-02-10T23:18:12.131796+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/redis/connection.py", line 316, in send_packed_command
    2014-02-10T23:18:12.132375+00:00 app[web.1]: ConnectionError: Error 111 connecting localhost:9456. Connection refused.

Any ideas as to why this might be? Thanks for your help

Upvotes: 0

Views: 489

Answers (1)

mgrouchy
mgrouchy

Reputation: 1961

looks like you are trying to connect to localhost, your redistogo instance is on a different server, not localhost. (I would suggest changing your redistogo instance, cause your username and password is here) but:

redisco.connection_setup(host='barreleye.redistogo.com', password='76f0a2c3f12b36b1389902e5fe93bfdd', port=9456) 

Upvotes: 1

Related Questions