XTDB unable to start a node

129 Views Asked by At

From their getting started

(defn start-xtdb! []
  (letfn [(kv-store [dir]
            {:kv-store {:xtdb/module 'xtdb.rocksdb/->kv-store
                        :db-dir (io/file dir)
                        :sync? true}})]
    (xt/start-node
     {:xtdb/tx-log (kv-store "data/dev/tx-log")
      :xtdb/document-store (kv-store "data/dev/doc-store")
      :xtdb/index-store (kv-store "data/dev/index-store")})))

(def xtdb-node (start-xtdb!))

(defn stop-xtdb! []
  (.close xtdb-node))

Upon starting the node, it throws

Execution error (RocksDBException) at org.rocksdb.RocksDB/open (RocksDB.java:-2).
lock hold by current process, acquire time 1649604606 acquiring thread 123145548206080: 

/Users/faiz.halde/Workspace/personal/data/proj/data/dev/index-store/LOCK: No locks available

Even tried deleting the data directory

CLJ - 1.10.3
openjdk version "1.8.0_292"
2

There are 2 best solutions below

1
javierweiss On

I ignore the cause of the problem. But I restarted the REPL and it worked.

0
Jeremy Taylor On

This usually indicates that you still have an active node running, because a RocksDB instance can only be access by one node at a time, however if you lose the reference to the original node then you can't shut it down directly and I believe the only option then is to restart the JVM.