This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-09
Channels
- # aleph (1)
- # announcements (7)
- # asami (1)
- # beginners (44)
- # calva (54)
- # cherry (24)
- # cider (6)
- # clj-kondo (19)
- # cljsrn (27)
- # clojure (119)
- # clojure-europe (61)
- # clojure-gamedev (38)
- # clojure-germany (7)
- # clojure-nl (1)
- # clojure-norway (104)
- # clojure-portugal (4)
- # clojure-spec (4)
- # clojure-uk (1)
- # clojurescript (38)
- # cursive (18)
- # datomic (11)
- # emacs (9)
- # events (1)
- # fulcro (4)
- # holy-lambda (7)
- # introduce-yourself (7)
- # jobs (1)
- # malli (6)
- # off-topic (4)
- # pathom (4)
- # pedestal (16)
- # podcasts-discuss (1)
- # polylith (27)
- # portal (17)
- # releases (2)
- # shadow-cljs (46)
- # squint (1)
- # xtdb (9)
Hi! 👋 I'm trying to set up datomic with Postgres, and I believe I set up everything correctly, but when I start my system datomic fails with the following error:
Terminating process - Lifecycle thread failed
java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: relation "datomic_kvs" does not exist
Position: 31
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at clojure.core$deref_future.invokeStatic(core.clj:2304)
at clojure.core$future_call$reify__8477.deref(core.clj:6976)
at clojure.core$deref.invokeStatic(core.clj:2324)
at clojure.core$deref.invoke(core.clj:2310)
at datomic.lifecycle_ext$standby_loop.invokeStatic(lifecycle_ext.clj:42)
at datomic.lifecycle_ext$standby_loop.invoke(lifecycle_ext.clj:40)
at clojure.lang.Var.invoke(Var.java:384)
at datomic.lifecycle$start$fn__3330.invoke(lifecycle.clj:73)
at clojure.lang.AFn.run(AFn.java:22)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "datomic_kvs" does not exist
That's really strange, because I made sure to initialize my database with the provided scripts, and the table does seem to exist when I check via psql
:
postgres@629dc6959e77:/$ psql
psql (15.0 (Debian 15.0-1.pgdg110+1))
Type "help" for help.
postgres=# SELECT * FROM datomic_kvs
postgres-# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+----------
public | datomic_kvs | table | postgres
(1 row)
Any idea what could be going on?Seems to be correct :thinking_face: But after investigating a bit more, I realized psql
doesn't show the table when I run with the datomic
user, so the problem seems to be there.
Yes, but, I don't know what extra permissions I'm supposed to give it. I'm just running the provided init scripts which seem to grant the right access on the tables.
I'm not sure if there's a recommended postgresql version to use with datomic, I have the feeling picking latest (15.0) may not have been the best choice here
Looks like I was able to get some progress. The table was not being created inside the datomic
database due to how I was running the initialization scripts. Unfortunately, there are more issues 😩
I set up my code to use the following uri to connect to datomic: datomic:
(where <POSTGRES-HOST> and <PASSWORD> are redacted for obvious reasons, but have correct values). When doing that, I'm getting this error:
> ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.]
Did you set alt-host?
It's mentioned in the docs somewhere...
I have a working docker-compose setup here:
https://github.com/ivarref/spa-monkey/blob/main/docker-compose.yml
(requires the folder datomic
from that repo as well.)
It has an init script that creates datomic_kvs...:
https://github.com/ivarref/spa-monkey/blob/main/datomic/init
(I agree that setting up datomic is way harder than it should be IMHO)
Note that in this setup I am not persisting any postgres data to an actual volume, so you will loose all work/changes when docker exits...