Andrea Reginato
Andrea Reginato

Reputation: 1338

Redis not able to connect using redis-rb (with Redistogo URL)

I've created a Redis To Go Nano plan on Heroku and I'm using the connection URL in different Heroku applications to share a rate-limit counter. Following all usual steps this is what I did.

I've added the add-on and I got back the REDISTOGO_URL.

# redis url
redis://user:[email protected]:9014/

This is the raised error.

RuntimeError: nodename nor servname provided, or not known

I tried to simulate the connection from command line.

store = Redis.connect(url: 'redis://user:[email protected]:9014/') 

store.get('key') # raises error

And I get that error. If I use the local Redis instance everything works just fine.

store = Redis.connect(url: 'redis://localhost:6379/0')
store('key') # does not raise error

Everything makes me think it's a problem related to the Redis URL. Am I missing something?

Upvotes: 1

Views: 581

Answers (1)

mogramer
mogramer

Reputation: 602

This was an issue that occurred with the redis to go spadefish server.
A CNAME was not initially configured for spadefish so you were getting a DNS resolution error.
The CNAME for spadefish has been added and you should not have a problem connecting to your instance.

Upvotes: 1

Related Questions