Fork me on GitHub
#datomic
<
2021-10-05
>
jdkealy01:10:53

Hi I'm getting an error when i try to connect to a new Transactor I set up using Dynamo DB I have [com.amazonaws/aws-java-sdk-dynamodb "1.11.600"] In my dependencies I set up the transactor using cloudformation and it created the dynamo table for me. d/connect throws

Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
com.amazonaws.http.TlsKeyManagersProvider
Calling (d/create-database uri) returns
Execution error (NoClassDefFoundError) at java.lang.Class/forName0 (Class.java:-2).
Could not initialize class datomic.ddb_cluster__init

Joe Lane02:10:02

Hey @U1DBQAAMB , that TLS key manager exception is due to aws sdk version mismatch in your peer. Remove (or change your ddb dep and things should start working.

jdkealy13:10:22

Removing the dependency throws the same issue for create-database, but for connect, it throws

Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
com.amazonaws.services.dynamodbv2.model.PutItemRequest

jdkealy13:10:04

I'm not sure what version to change it to. I'm using datomic-pro 1.0.6344

jdkealy13:10:32

I also commented out all the other AWS sdk dependencies and namespaces. @U0CJ19XAM

Joe Lane13:10:00

Ok. Why don't you open a support ticket and we will get it sorted out.

Petrus Theron08:07:40

Also running into this.

Joe Lane12:07:51

I don’t think you’re depending on the right version of dynamodb @U051SPP9Z

hden11:10:25

Anyone experienced connectivity issue with analytics preview? Symptoms • Datomic Cloud https://docs.datomic.com/cloud/changes.html#781-9041 • Presto CLI v348 • It’s not a security group issue, since I can connect to the database via datomic client access command just fine. • Restarting the access gateway doesn’t resolve the issue (`datomic gateway restart`)

; presto --server localhost:8989 --debug
presto> SHOW SCHEMAS FROM system;
Error running command: java.net.SocketException: Connection reset
java.io.UncheckedIOException: java.net.SocketException: Connection reset
at io.prestosql.client.JsonResponse.execute(JsonResponse.java:154)
at io.prestosql.client.StatementClientV1.<init>(StatementClientV1.java:135)
Submitted a support ticket: 3316

hden13:10:42

Fixed the issue by restarting the Bastion by EC2 instance refresh.

vlaaad12:10:01

Why I cannot do this?

(db/q 
  '[:find ?c
    :in $db0 $db1 ?id
    :where (or [$db0 ?c :concept/id ?id]
               [$db1 ?c :concept/id ?id])]
  db0 db1 "3tq2_f1E_Lyh")
=> Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
   Nil or missing data source. Did you forget to pass a database argument?

favila12:10:29

You can’t do this because rules (`or` is syntax sugar for a named rule) accept only one data source, implicitly $, explicitly ($ds or…)

vlaaad12:10:00

ah, makes sense. thanks

favila12:10:39

That’s not a “deep” reason why, but it’s the proximate reason for your exception

vlaaad12:10:33

side note: if only I could supply coll of databases, e.g. :in [$ ...]

💯 1
Linus Ericsson12:10:56

If you get the eid of ?c you will also need to know which db it exists in. I think you should use ordinary clojure functions for doing a db-nil-safe lookup with (d/entid ) or similar, working of the collection of dbs. When you get the correct db, you can do further questions with d/q queries.

vlaaad12:10:47

It’s a cloud, so I try to build a query that loads all I need instead of calling it multiple times. N+1..

vlaaad12:10:02

anyway, I found what I wanted using multiple (q) s inside a query and then doing or on the results

Linus Ericsson12:10:36

ok, don't know enough about cloud obv.

Jarrod Taylor (Clojure team)13:10:48

Typically you shouldn’t need to have excessive apprehension about making multiple queries https://docs.datomic.com/cloud/whatis/architecture.html#large-data-sets

vlaaad13:10:39

my concern is not large data sets but network latency when running many queries

Jarrod Taylor (Clojure team)13:10:29

Often times that does not need to be a major concern. From the link “Datomic is designed for use with data sets much larger than can fit in memory, while providing in-memory performance for query

Joe Lane14:10:05

I think Vlad is using cloud via a client application, not from within an ion, that is why he is concerned about network requests.

👍 1
Benjamin14:10:12

https://docs.datomic.com/on-prem/overview/storage.html#provisioning-dynamo I'm trying to follow the guide for automatic dynamo transactor setup

bin/datomic ensure-transactor <file> <file>
yields
com.amazonaws.services.identitymanagement.model.AmazonIdentityManagementException: Must specify userName when calling with non-User credentials (Service: AmazonIdentityManagement; Status Code: 400; Error Code: ValidationError; Request ID: b64c5009-5899-4dec-9c14-34d9f78b0e89; Proxy: null)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1403)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1372)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530)
	at com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient.doInvoke(AmazonIdentityManagementClient.java:11007)
	at com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient.invoke(AmazonIdentityManagementClient.java:10974)
	at com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient.invoke(AmazonIdentityManagementClient.java:10963)
	at com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient.executeGetUser(AmazonIdentityManagementClient.java:6128)
	at com.amazonaws.services.identitymanagement.AmazonIdentityManagementClient.getUser(AmazonIdentityManagementClient.java:6098)
	at datomic.iam$get_user.invokeStatic(iam.clj:66)
	at datomic.iam$get_user.invoke(iam.clj:66)
	at datomic.iam$get_account_id.invokeStatic(iam.clj:109)
	at datomic.iam$get_account_id.invoke(iam.clj:107)
	at datomic.provisioning.aws$fn__31025.invokeStatic(aws.clj:493)
	at datomic.provisioning.aws$fn__31025.invoke(aws.clj:491)
	at clojure.lang.MultiFn.invoke(MultiFn.java:229)
	at datomic.provisioning.aws$ensure_transactor.invokeStatic(aws.clj:665)
	at datomic.provisioning.aws$ensure_transactor.invoke(aws.clj:659)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at datomic.require$require_and_run.invokeStatic(require.clj:22)
	at datomic.require$require_and_run.doInvoke(require.clj:17)
	at clojure.lang.RestFn.invoke(RestFn.java:423)
	at datomic$_main$fn__163.invoke(datomic.clj:150)
	at datomic$_main.invokeStatic(datomic.clj:149)
	at datomic$_main.doInvoke(datomic.clj:142)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.main$main_opt.invokeStatic(main.clj:514)
	at clojure.main$main_opt.invoke(main.clj:510)
	at clojure.main$main.invokeStatic(main.clj:664)
	at clojure.main$main.doInvoke(main.clj:616)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:40)

jaret16:10:13

@benjamin.schwerdtner That error would be thrown if you are missing credentials for an admin account required to create all the DDB tables, IAM roles, S3 Buckets, permissions etc.

jaret16:10:29

Can you try with admin credentials sourced?

jaret16:10:59

Are you trying to use temporary or assume role credentials? I use static admin credentials when using our ensure etc

Benjamin16:10:16

@jaret ah that sounds promising I try. It wasn't with admin creds

Benjamin17:10:33

@jaret I'm copying those credentials and it also does something (if I don't do it it throws another err about token not set or sth). --> but still have the same err with username

Benjamin11:10:18

fixed. I figured out I needed an IAM role instead of those account credentials. Not at all obvious to a aws newbee

Petrus Theron22:07:16

@benjamin.schwerdtner I am having the same issue. Can you describe how you created this IAM role and what settings you used, please?

Benjamin07:07:21

I must have had or made an iam role with access to everything I suppose.

Petrus Theron07:07:12

Morning 🙂 is an IAM Role the same thing as a User in IAM with certain policies?

eggsyntax18:10:09

On-Prem (Pro) pricing question: if I want to use Datomic for a single app, but for compliance reasons I need separate instances of the app/db/transactor in different AWS regions, does that count as a single Datomic license or as one per region? Couldn't find an answer in the docs or on http://ask.datomic.com.

Jarrod Taylor (Clojure team)18:10:35

Interested to hear more about the multi region requirements but typically a license covers a single system. A system is defined as a single production transactor, its standby and all connected peers and/or clients.

eggsyntax19:10:26

Gotcha, thanks! I knew that it typically meant a single transactor (+ maybe fallback) but didn't know if there was a difference if it was just identical systems in multiple regions. > Interested to hear more about the multi region requirements As I understand it (though I'm not expert in this aspect) it's the usual sort of issue where various countries require that certain kinds of data about people have to be stored/processed in either the same country or same region. That's a pre-existing business requirement; I'm considering Datomic for a new project within the business & trying to do an initial cost estimate given the existing requirement.

Jarrod Taylor (Clojure team)19:10:55

Yes, in that case each region would be an independent system so one license each. Feel free to ping if you have any follow up questions.

eggsyntax19:10:24

Got it. Thanks Jarrod!