Closed 0atman closed 7 years ago
MORE CONTEXT!
The connection errors are because carmine is connecting to localhost, no matter what I do. Here is the full output from a repl session, from my ns store.core
, which require
s [taoensso.carmine :as redis]
:
(def conn
{:pool {}
:spec {:url "redis://redistogo:[password]@chubb.redistogo.com:9836/"}})
#'store.core/conn
store.core=> (redis/wcar conn (redis/hget 1 2))
java.net.ConnectException: Connection refused (Connection refused)
clojure.lang.ExceptionInfo: Carmine connection error
enable local redis in another terminal
store.core=> (redis/wcar conn (redis/hget 1 2))
"3"
^ this is now connecting to my local redis, despite `conn` pointing to redistogo.
What am I doing wrong? This usage seems exactly as carmine.clj#L28 suggests!
@ptaoussanis can you help me?
Hi Tristram,
(def conn {:pool {} :spec {:url "redis://redistogo:[password]@chubb.redistogo.com:9836/"}})
Could you possibly try with :uri
instead of :url
? (Assuming this wasn't just a typo?)
That was it, I am an idiot. I even pasted the line from carmine.clj above mine and was wondering what the difference was. Amazing. Thank you so much @ptaoussanis
No problem, these kinds of things easily happen. Happy the solution turned out to be simple!
Cheers :-)
I've added the information to the readme in this PR that I would have needed to get a week of my life back :laughing: #195
Hey there, thanks for an amazing library which works great in my local dev, however I'm having trouble when setting the :spec :url to what Heroku has given me:
REDIS_URL: redis://h:[password]@myhost.eu-west-1.compute.amazonaws.com:11439
It gives me:
I've sshed into the box to confirm that the connection shouldn't be refused, I can telnet into the redis box.
I've tried splitting up the connection URL manually, as suggested in carmine.clj#L29, but this doesn't seem to work - I also note there doesn't seem to be a
:user
option.What am I missing?