Fork me on GitHub
#datomic
<
2021-12-21
>
jarppe08:12:44

Does Datomic on-prem support Postgres 14? I’m getting org.postgresql.util.PSQLException with message “The authentication type 10 is not supported”

jarppe08:12:12

Do I have to downgrade Postgres, or is there a workaround for this?

jarppe08:12:30

I’m using Datomic 1.0.6344

jarppe08:12:41

I guess this is caused by the JDBC driver Datomic uses, which is postgres-9.3-1102, released in 2014!

jaret14:12:16

Hi @U0GE2JPNC I've made a story to look into this. I am aware of several customers using Postgres 11, but we don't actively test with every version of Postgres. After investigation if this is indeed related to the driver we will update in a future release of Datomic on-prem.

jarppe15:12:28

Great! From my googling “postgres The authentication type 10 is not supported” it really looks like a driver issue. When I disable authentication on Postgres side by adding this to pg_hba.conf:

host all all all trust

👍 1
jarppe15:12:40

Then transactor connects successfully

jarppe15:12:25

I’ll try to find time to see what happens if I just put more recent driver jar on transactor classpath

jarppe15:01:08

Hi @U1QJACBUM, have you any updates on this?

jarppe15:01:20

I have not tried to update the JAR yet

jarppe15:01:44

I was wondering should I invest some this to this, or should I just wait for update on Datomic

mmeijden10:12:06

Hi, I have a question regarding the AMI lifecycle/updates. We've recently integrated the Datomic instances with Systems Manager and there we found some findings that should be patched (recommended by AWS == required by our Security department). However, these patches require a reboot that triggers the autoscaling group to flag the instance as unhealthy and killing it. Is there a way to get more often patched/updated AMI's than the regular datomic upgrades, so we can schedule this e.g. daily?

jaret12:12:42

Are you referring to the AMI in Datomic Cloud? Or are you rolling your own AMI with on-prem? What is the recommendation from AWS/Security department? What findings should be patched? Is it a CVE? I am unsure what you mean with this question: "Is there a way to get more often patched/updated AMI's than the regular datomic upgrades, so we can schedule this e.g. daily?" What is "this"? The system manager update?

tlonist15:12:05

I’m trying to run peer server using a local transactor with MySQL database. I think I succeeded in running the transactor, but somehow my peer server keeps on failing. Here is transactor.properties.

protocol=sql
host=localhost
port=4434
license-key=
sql-url=jdbc:
sql-user=datomic
sql-password=datomic
sql-driver-class=com.mysql.cj.jdbc.Driver
memory-index-max=256m
memory-index-threshold=32m
object-cache-max=32m
I created database called datomic, created user/pw granting all with ‘datomic’, and created a table. All according to the guide in bin/sql.

tlonist15:12:53

I’m running this command for peer server bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d datomic,datomic:

tlonist15:12:08

The error says

Execution error (ConnectException) at java.net.PlainSocketImpl/socketConnect (PlainSocketImpl.java:-2).
Connection refused (Connection refused)
Any idea on how I can get this work?

jaret15:12:28

@tlonist.sang your peerserver needs to be pointed at the same URL that is output from your transactor. In this case you are pointing peer server at dev to serve a dev DB but you have a sql system.

tlonist15:12:38

Aha, thanks for pointing that out!

tlonist16:12:55

Now I’m runing into could not find datomic in catalog problem. • DB created • User created • Table created • jdbc url properly configured ( I think)

bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d datomic,datomic:\&password=datomic

tlonist16:12:19

Do I need to mention transactor port somewhere in the command?

jaret16:12:23

You have to have the db created to serve the db. Peer server cannot be used to create the db.

jaret16:12:55

You will need to create a Datomic db on the system then serve it

jaret16:12:31

You can do this by connecting to your db from a repl and using the peer api to create database.

tlonist16:12:45

hmm, but I manually created a db called ‘datomic’ as directed in bin/sql, create database.

tlonist16:12:36

does ‘creating db’ mean something different than creating an actual database in mysql?

tlonist16:12:50

Thanks, it works like a charm! wow

jaret15:12:44

Essentially you need to pass the -d dbname and URI for your running system. They are described in the documentation for connect as well:

wilkerlucio21:12:43

hello, I'm trying to find out how in a Datomic transaction can I express some data to be included in the transaction itself, can someone please provide an example of that?

favila21:12:16

do you mean assertions on the transaction entity? i.e. transaction metadata?

favila21:12:37

"datomic.tx" is a tempid that will resolve to the current transaction

favila21:12:53

(or also (d/tempid :db.part/tx) for on-prem)

favila21:12:07

so just use that in place of the entity

wilkerlucio21:12:25

works like a charm, thanks!

wilkerlucio21:12:08

just in case anybody else comes to this, an example:

(transact conn [[:db/add "entity" :member/name "Wilker"]
                  [:db/add "datomic.tx" :audit/cid "avasa.csaca.csa"]])