This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-28
Channels
- # announcements (33)
- # aws (2)
- # babashka (14)
- # beginners (128)
- # calva (34)
- # cestmeetup (3)
- # clj-kondo (12)
- # cljdoc (3)
- # clojure (114)
- # clojure-europe (31)
- # clojure-italy (3)
- # clojure-nl (7)
- # clojure-uk (6)
- # clojurescript (35)
- # conjure (20)
- # cursive (3)
- # data-science (3)
- # datomic (16)
- # docker (13)
- # events (1)
- # figwheel-main (22)
- # fulcro (109)
- # jobs (1)
- # kaocha (8)
- # keechma (1)
- # lambdaisland (5)
- # malli (1)
- # meander (8)
- # mid-cities-meetup (1)
- # off-topic (6)
- # overtone (7)
- # pathom (6)
- # re-frame (2)
- # reitit (9)
- # ring (1)
- # shadow-cljs (92)
- # specter (1)
- # tools-deps (311)
- # xtdb (76)
Hi, i am trying to start a crux node when my ring app is launched. I use lein ring uberwar and deploy it with tomcat. My ring config is
:ring {
:handler app.core/app
:init app.core/start-app!
:destroy app.core/stop-app!
:servlet-name "ehdsicts2_servlet"
:servlet-class "ehdsicts2_servlet"
:resources-war-path "WEB-INF/classes/"
:uberwar-name "ehdsicts2.war"}
the start-app! function start the crux node like
(defonce node (atom nil)); (start-node "crux-store"))
(defn start-node [storage-dir]
(reset! node
(crux/start-node {:crux.node/topology '[crux.standalone/topology
crux.kv.rocksdb/kv-store]
:crux.standalone/event-log-dir "/Users/ouvanous/ehdsi-cts/crux-store/eventlog-1"
:crux.standalone/event-log-kv-store 'crux.kv.rocksdb/kv
:crux.kv/db-dir (str "/Users/ouvanous/ehdsi-cts/crux-store/db")}))
nil)
(defn stop-node
[]
(.close @node))
While using it as a jar, everything works correctly but when deploying it on tomcat, tomcat is crashing and i can't find any useful inofmration on what the problem can be ...
May b e someone here know what i miss here?
I did post also this question on #crux channel but it is not really related to crux itself as this works outside tomcat.
Any tip would be very appreciated
Many thanks and have a nice day!