【问题标题】:clojure carmine redis connection errorsclojure胭脂红redis连接错误
【发布时间】:2017-10-14 19:22:41
【问题描述】:

每当我在本地机器之外运行我的代码时,我都会被连接错误困扰一周。

无论我做什么,连接错误都是因为 carmine 正在连接到 localhost。这是来自我的 ns store.core 的 repl 会话的完整输出,其中 requires [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

[在另一个终端启用本地 redis]

store.core=> (redis/wcar conn (redis/hget 1 2))
"3"
 ^ this is now connecting to my local redis, despite `conn` pointing to redistogo.

我做错了什么?这种用法似乎与carmine.clj#L28 建议的完全一样!

【问题讨论】:

    标签: clojure redis redistogo carmine


    【解决方案1】:

    胭脂红作者的回答

    您可以尝试使用 :uri 而不是 :url 吗?

    source

    FML

    【讨论】:

      猜你喜欢
      • 2016-12-20
      • 1970-01-01
      • 2017-02-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-06
      • 1970-01-01
      • 2012-08-12
      相关资源
      最近更新 更多