lein REPL服务器启动超时 [英] lein REPL server launch timed out
问题描述
lein run
我的猜测是数据库连接是搞乱了,所以,问题是,我怎么能调试或弄清楚这是什么的原因 lein repl
超时?
我的project.clj
<
(defproject myproject0.1.0-SNAPSHOT
:main myproject.core
:jvm-opts [-Xmx1G]
:datomic {:schemas [资源[myproject-schema.edn]]}
:plugins [[lein-ring0.8.10]]
; cp bin / transactor config / samples / free-transactor-属性资源/ transactor.properties
:profiles {:dev
{:datomic {
;:config resources / transactor.properties
;:db-uridatomic:free: /127.0.0.1:4334/myproject}
:db-uridatomic:ddb:// us-east-1 / datomica / myproject}
:dependencies [[ring- mock0.1.5]
[midje1.5.1]
]
}
}
:dependencies [[org.clojure / clojure1.5。 1]
[com.datomic / datomic-pro0.9.4556]
; [com.datomic / datomic-free0.9.4470]
[com.cemerick / friend0.2.0]
[liberator0.10.0]
[compojure1.1 .5]
[http-kit2.1.13]
[cheshire5.1.1]
[ring / ring-jetty-adapter1.1.0]
[ring / ring-devel1.2.0]
[org.clojure / clojure-contrib1.2.0]
[url621.0.0-SNAPSHOT]
[clj-http0.7.8]
[org.clojars.nathell / clojure-contrib1.2.0]
[com.taoensso / timbre3.0.0-RC4]
[clj-aws-s30.3.8]
[image-resizer0.1.5]
[pandect0.3.1]
[base64-clj0.1 .1]
]
:ring {
:handler myproject.core
}
)
我的profiles.clj
cat〜/ .lein / clj
{:user {:dependencies [[slamhound1.5.0]]
:aliases {slamhound[run-mslam.hound]}
:plugins [[lein-datomic0.2.0]
[lein-midje3.0.0]
[lein-html5-docs2.0.0]
[lein- pprint1.1.2-SNAPSHOT]]
; :datomic {:install-location/ opt / datomic-free}
:datomic {:install-location/ opt / datomic-pro /}
}
}%
我的.zshrc
export CLASSPATH = $ CLASSPATH:/ home / user:/ opt / datomic-pro:。
我的env
Leiningen 2.3.3 on Java 1.7.0_25 OpenJDK 64位服务器VM
Linux 3.8.0-35-generic#50-Ubuntu SMP Tue Dec 12 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU / Linux
鸭子顺序。在您的project.clj文件中指定:repl-options
,其延时时间更长:
:repl-options {
;;如果nREPL加载太长,可能会超时,
;;增加这个等待更长时间超时。
;;默认值为30000(30秒)
:timeout 120000
}
应该做的伎俩。
in a liberator based clojure project we are using datomic as DB. After migrating our local dev DB to a S3 hosted one and adding the needed dependencies on our project.clj we cannot launch the REPL but the Liberator stack runs fine through lein run
My guess is that the DB connection is messing things up, so, the question is, how can I somehow "debug" or figure out what's the reason of this lein repl
timeout?
My project.clj
(defproject myproject "0.1.0-SNAPSHOT"
:main myproject.core
:jvm-opts ["-Xmx1G"]
:datomic {:schemas ["resources" ["myproject-schema.edn" ]]}
:plugins [[lein-ring "0.8.10"]]
; cp bin/transactor config/samples/free-transactor-template.properties resources/transactor.properties
:profiles {:dev
{:datomic {
; :config resources/transactor.properties
; :db-uri "datomic:free://127.0.0.1:4334/myproject"}
:db-uri "datomic:ddb://us-east-1/datomica/myproject"}
:dependencies [[ring-mock "0.1.5"]
[midje "1.5.1"]
]
}
}
:dependencies [[org.clojure/clojure "1.5.1"]
[com.datomic/datomic-pro "0.9.4556"]
; [com.datomic/datomic-free "0.9.4470"]
[com.cemerick/friend "0.2.0"]
[liberator "0.10.0"]
[compojure "1.1.5"]
[http-kit "2.1.13"]
[cheshire "5.1.1"]
[ring/ring-jetty-adapter "1.1.0"]
[ring/ring-devel "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[url62 "1.0.0-SNAPSHOT"]
[clj-http "0.7.8"]
[org.clojars.nathell/clojure-contrib "1.2.0"]
[com.taoensso/timbre "3.0.0-RC4"]
[clj-aws-s3 "0.3.8"]
[image-resizer "0.1.5"]
[pandect "0.3.1"]
[base64-clj "0.1.1"]
]
:ring {
:handler myproject.core
}
)
My profiles.clj
cat ~/.lein/profiles.clj
{:user {:dependencies [[slamhound "1.5.0"]]
:aliases {"slamhound"["run" "-m" "slam.hound"]}
:plugins [[lein-datomic "0.2.0"]
[lein-midje "3.0.0"]
[lein-html5-docs "2.0.0"]
[lein-pprint "1.1.2-SNAPSHOT"]]
; :datomic {:install-location "/opt/datomic-free"}
:datomic {:install-location "/opt/datomic-pro/"}
}
}%
My .zshrc
export CLASSPATH=$CLASSPATH:/home/user:/opt/datomic-pro:.
My env
Leiningen 2.3.3 on Java 1.7.0_25 OpenJDK 64-Bit Server VM
Linux 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
It can sometimes take a while for all the ducks to be in order. Specify :repl-options
in your project.clj file with a longer time-out like this:
:repl-options {
;; If nREPL takes too long to load it may timeout,
;; increase this to wait longer before timing out.
;; Defaults to 30000 (30 seconds)
:timeout 120000
}
Hopefully that should do the trick.
这篇关于lein REPL服务器启动超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!