This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-20
Channels
- # announcements (4)
- # beginners (5)
- # biff (1)
- # calva (2)
- # clj-kondo (32)
- # clojure (50)
- # clojure-czech (6)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (77)
- # clojure-uk (2)
- # core-logic (1)
- # cursive (6)
- # datahike (1)
- # datomic (15)
- # emacs (2)
- # events (1)
- # honeysql (1)
- # hyperfiddle (45)
- # introduce-yourself (2)
- # lsp (9)
- # other-lisps (10)
- # overtone (2)
- # polylith (5)
- # practicalli (1)
- # ring (2)
- # shadow-cljs (6)
Hi, I'm using now 1.0.7021 but tried also 1.0.7010.
I'm trying to setup transactor in a docker image, deploy it and connect from peer, but I keep getting AMQ219007
I've deployed storage to postgresql (working as intended).
I'm creating dockerfile that is running bin/transactor with properties as defined in sql config example.
Where host is an ip of a pod. I've also added sql-driver-params as suggested in documentation troubleshooting.
I'm running the transactor inside a docker with: docker run -p 4334:4334 -p 4335:4335 --net=host --detach [docker-image]
And I get connection it runs without error.
But when I try to connect to it from my repl
(deps:
com.datomic/peer {:mvn/version "1.0.7021"}
org.postgresql/postgresql {:mvn/version "42.5.1"})
(require '[datomic.api :as d])
(def db-uri "datomic:")
(d/create-database db-uri)
I get the message:
Caused by org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException
AMQ219007: Cannot connect to server(s). Tried with all available servers.
Any idea what may be causing this?I've tried java 11 and 17
Error suggests the peer could connect to Postgres but could not connect to the transactor. Does the transactor.properties have a host or alt-host that the peer can route to?
Properties:
###################################################################
protocol=sql
host=[pod-ip]
port=4334
alt-host=localhost
###################################################################
sql-url=jdbc:postgresql://[db-data]
sql-user=[user]
sql-password=[pass]
## The Postgres driver is included with Datomic. For other SQL
## databases, you will need to install the driver on the
## transactor classpath, by copying the file into lib/,
## and place the driver on your peer's classpath.
sql-driver-class=org.postgresql.Driver
## Driver specified params, as semicolon-separated pairs.
sql-driver-params=ssl=true;sslfactory=org.postgresql.ssl.NonValidatingFactory;
## The query used to validate JDBC connection.
# Optional
sql-validation-query=select 1
# Recommended settings for -Xmx1g usage, e.g. dev laptops.
memory-index-threshold=32m
memory-index-max=256m
object-cache-max=128m
My dockerimage if interesting:
FROM clojure:temurin-17-tools-deps-1.11.1.1413-alpine
RUN apk --no-cache add --upgrade curl
ENV DATOMIC_VERSION 1.0.7021
ENV DATOMIC_HOME /opt/datomic-pro-$DATOMIC_VERSION
RUN curl -SL \
-o /tmp/datomic.zip \
&& unzip /tmp/datomic.zip -d /opt \
&& rm -rf /tmp/datomic.zip
ADD config $DATOMIC_HOME/config
WORKDIR $DATOMIC_HOME
ENTRYPOINT ["./bin/transactor"]
EXPOSE 4334 4335 4336
CMD ["config/psqltransactor.properties"]
I was wondering if the running command is the issue
docker run -p 4334:4334 -p 4335:4335 --net=host --detach [docker-image]
Since it gives me warning:
WARNING: Published ports are discarded when using host network mode
But when I do curl [pod-ip]:4334
I get Empty reply from server
which means it's running and is accessible (I think so)
I've been trying to figure it out, why it may not work, but have no idea, I was trying it already on clever cloud and digital ocean 🤷
hi When i open it, it’s encrypt (https://prnt.sc/xEKFqIGaW1iq) I need a file like this https://github.com/sharetribe/datomic-docker-free/blob/master/transactor.properties.example so i can get host and alt-host to access datomic db. do u know how to decrypt it?
I hear that we need to check host and al-host … but when i check aws secret manager, it’s encrypt
does anyone know how to decode it