This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-05
Channels
- # beginners (46)
- # calva (89)
- # cider (24)
- # clara (7)
- # clj-kondo (36)
- # clojure (33)
- # clojure-australia (4)
- # clojure-dev (9)
- # clojure-europe (15)
- # clojure-israel (1)
- # clojure-nl (1)
- # clojure-uk (13)
- # clojurescript (55)
- # community-development (38)
- # conjure (1)
- # cryogen (12)
- # cursive (16)
- # data-science (4)
- # datomic (39)
- # events (2)
- # fulcro (5)
- # gorilla (3)
- # introduce-yourself (3)
- # jobs (9)
- # kaocha (5)
- # malli (16)
- # music (12)
- # off-topic (11)
- # polylith (4)
- # react (4)
- # reactive (1)
- # reagent (18)
- # remote-jobs (2)
- # reveal (2)
- # sci (4)
- # shadow-cljs (31)
- # timbre (4)
- # tools-build (70)
- # tools-deps (11)
- # vim (33)
- # xtdb (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
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.
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
I also commented out all the other AWS sdk dependencies and namespaces. @U0CJ19XAM
Also running into this.
I don’t think you’re depending on the right version of dynamodb @U051SPP9Z
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: 3316Why 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?
You can’t do this because rules (`or` is syntax sugar for a named rule) accept only one data source, implicitly $, explicitly ($ds or…)
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.
It’s a cloud, so I try to build a query that loads all I need instead of calling it multiple times. N+1..
anyway, I found what I wanted using multiple (q)
s inside a query and then doing or
on the results
ok, don't know enough about cloud obv.
Typically you shouldn’t need to have excessive apprehension about making multiple queries https://docs.datomic.com/cloud/whatis/architecture.html#large-data-sets
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
”
I think Vlad is using cloud via a client application, not from within an ion, that is why he is concerned about network requests.
Details matter 🙂
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)
@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.
Are you trying to use temporary or assume role credentials? I use static admin credentials when using our ensure etc
@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
fixed. I figured out I needed an IAM role instead of those account credentials. Not at all obvious to a aws newbee
@benjamin.schwerdtner I am having the same issue. Can you describe how you created this IAM role and what settings you used, please?
Morning 🙂 is an IAM Role the same thing as a User in IAM with certain policies?
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.
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.
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.
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.