This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-21
Channels
- # bangalore-clj (11)
- # beginners (82)
- # boot (1)
- # braveandtrue (29)
- # cider (16)
- # cljdoc (2)
- # cljs-dev (2)
- # clojure (74)
- # clojure-dev (3)
- # clojure-italy (2)
- # clojure-mke (1)
- # clojure-nl (4)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (53)
- # clojure-ukraine (1)
- # clojurescript (33)
- # cursive (29)
- # datomic (59)
- # editors (4)
- # emacs (14)
- # fulcro (2)
- # graphql (12)
- # hoplon (2)
- # nyc (4)
- # onyx (5)
- # parinfer (10)
- # pedestal (22)
- # re-frame (11)
- # reagent (35)
- # ring-swagger (5)
- # shadow-cljs (150)
- # tools-deps (9)
- # vim (1)
- # yada (20)
Out-dated link in Datomic Cloud v0.8.54 query exception: (datomic.client.api/q '[:find [?e ...] :where ...] cloud-db)
throws Only find-rel elements are allowed in client find-spec, see
, which links to on-prem documentation that does support find-coll return, which was confusing. Exception should probably link to https://docs.datomic.com/cloud/query/query-data-reference.html
Does datomic.client.api/with
work for prospective tx on Datomic Cloud?
(d/transact cloud-conn {:tx-data []})
=> {:db-before {:database-id "57ad2773-...", :db-name "my-db", :t 3, :next-t 4, :type :datomic.client/db}, :db-after {:database-id "57ad2773-...", :db-name "my-db", :t 4, :next-t 5, :type :datomic.client/db}
(d/with (d/db conn) {:tx-data []}) ;; also throws for actual tx-data values
=> Exception: `clojure.lang.ExceptionInfo: Datomic Client Exception {:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}`
Hi @U051SPP9Z! At first glance seems like that should work. What do the logs say? https://docs.datomic.com/cloud/operation/monitoring.html#searching-cloudwatch-logs
Hi @U072WS7PE. I can't seem to find any logs related to this error, but I'll PM you my log group name. I see other errors about trying to use a missing db function though. (would be cool if I could stream errors related to my queries into REPL)
We are improving error messages with each release. Are you on the latest client and CFT?
I'm on com.datomic/client-cloud {:mvn/version "0.8.54"}
and CFT version 402.
so the first thing I search in any Datomic Cloudwatch log is "Alert - Alerts" -- that text will find all the potentially scary stuff, if any
Example at https://docs.datomic.com/cloud/operation/monitoring.html#finding-alerts
Took me about a minute to find the little page icon for CloudFormation template URL on https://docs.datomic.com/cloud/releases.html, which you can't right-click on. So I had to go to web inspector to find it. (It's not obvious that clicking on it puts something in your clipboard.)
Attempting to create a new CloudFormation stack from template triggers Rollback with reason: No export named mysystem-CatalogTable found. Rollback requested by user.
(I did not initiate anything)
Hm, I must have done something wrong - probably didn't tick "Reuse existing storage" to yes, or it didn't detect when I pasted JSON template URL
Stack started up again, but bastion instance not created
Why would I not see an "Enable bastion?" option for the latest Solo CloudFormation template (v409)?
Hmm...maybe I triggered the Storage only template. Trying to fix it via "Update Stack" with the Solo template and enabling bastion triggers a rollback again, with reason Export mysystem-Subnet1 cannot be deleted as it is in use by mysystem
sigh I'm going to delete the whole stack and start over again
Can't recreate stack with same name: No export named "mysystem-Subnet2" found. Rollback requested by user.
After attempting an upgrade to 409 by deleting my stack as per docs (maybe it wasn't a "first upgrade"?) I had to go via the marketplace to avoid the subnet error and get the VPC options again; so far it doesn't seem to be rolling back. This cloud state management stuff is so complicated.
Wow, that is a bummer. Will investigate.
Can't recreate stack with same name: No export named "mysystem-Subnet2" found. Rollback requested by user.
With Ions, I’m getting random stack overflows in my code when pushing to AWS,
"java.lang.StackOverflowError, compiling:(buddy/core/bytes.clj:72:15)"
Usually something in buddy, but not the same file every time. This started happening after adding Amazonica to do some S3 stuff.
This is on solo, so is it likely to be OOM errors?@U06B8J0AJ this is definitely solo not having enough mem
Poor solo. Can I edit the official cloud-formation template to use t2.medium or something instead?
No. Solo runs only on t2.smalls. I am considering other options.
If the problem is in compilation then deploying compiled bits may help.
The last time I checked, Amazonica is enormous, and only has a monolithic deploy.
Yeah, I tried my best to rip out large parts of it, but no go. I will consider other options. Perhaps the REST API instead, for now.
I’m making a prototype at my own expense to convince my colleagues to Do The Right Thing, so I’d rather avoid taking on the cost of the production topology at the moment.
I had similar issues with amazonica myself. It’s a nice library, but I find it a bit too clever and bulky. I ended up just writing some small functions to do what I needed in S3 using interop and the DefaultAWSCredentialsProviderChain. It works great for my needs, and I’m happy to share the code with you if you’d like.
@UBBBNAS6T That would be fantastic, thank you!
(ns util.aws.s3
(:import [com.amazonaws AmazonServiceException, SdkClientException]
[com.amazonaws.auth DefaultAWSCredentialsProviderChain]
[com.amazonaws.services.s3 AmazonS3, AmazonS3ClientBuilder]
[com.amazonaws.services.s3.model ObjectMetadata, PutObjectRequest]))
(defn default-s3-client []
(AmazonS3ClientBuilder/defaultClient))
(defn stack-trace-as-str [e]
(let [sw (java.io.StringWriter.)
pw (java.io.PrintWriter. sw)
_ (.printStackTrace e pw)]
(str sw)))
(defn put-object-string
([bucket-name key-name value]
(put-object-string (default-s3-client) bucket-name key-name value))
([s3-client bucket-name key-name value]
(try
(let [field-puller (fnil
(juxt (memfn getContentMd5)
(memfn getETag)
(memfn getExpirationTime)
(memfn getExpirationTimeRuleId)
(memfn getMetadata)
(memfn getVersionId)
(memfn isRequesterCharged))
{:response-obj "no data!"})
[md5-hash
etag
expiration-time
expiration-time-rule-id
metadata
version-id
requester-charged?] (field-puller
(.putObject s3-client bucket-name key-name (str value)))]
(cond-> {}
md5-hash (assoc :md5-hash md5-hash)
etag (assoc :etag etag)
expiration-time (assoc :expiration-time expiration-time)
expiration-time-rule-id (assoc :expiration-time-rule-id expiration-time-rule-id)
version-id (assoc :version-id version-id)
true (assoc :requester-charged? requester-charged?)))
(catch AmazonServiceException e (stack-trace-as-str e))
(catch SdkClientException e (stack-trace-as-str e)))))
I only ever needed stuff on the put side, so there’s not much too this, but here you go anyway 🙂
@UBBBNAS6T Do you manually rip out all AWS libraries you don’t use, or do you find it possible to include the entire SDK?
for s3, I’ve been relying on the dependency that’s transitively included with an ion project, so I didn’t explicitly put it in my deps.edn, but as a rule, I’m only including the parts of the SDK that I am using.
in this case, com.amazonaws/aws-java-sdk-s3 1.11.314
is coming through transitively because of the ion-dev
dependency
Did you deploy to a strong name (git SHA) or a weak one?
If you are deploying to the same weak name over and over, rollback cannot work because you are overwriting the thing to roll back to
That said, the stack overflow thing can be intermittent, so it may be you got lucky the first time and now cannot get back.
No, I consistently use git SHAs for deploy. I think you’re right in that I got lucky. Maybe AWS is rolling back to that one lucky build. I’m worried I’ve screwed something up permanently though. I’m getting failed deploys for older builds even, where Amazonica definitely was absent.
I suffered that problem as well a while back. In my case, it was due to the dep warnings seen during the push step. Once I found the right combination, the stackoverflows went away. My errors were referring to Specter for the stackoverflow but that was not accurate, it’s just where it was executing when it ran out of mem.
How do I refer to the tx-id in a transact
call using Datomic Cloud?
"datomic.tx" if I remember correctly. It's some magic string, you should be able to find it somewhere in the docs.
Where do my Datomic Cloud queries actually run? Do they run on the t2.small EC2 instance, or is that just a transactor?
Bwa ha ha. It is magic!
There are no transactors. Nodes do all the things. https://docs.datomic.com/cloud/whatis/architecture.html#nodes
So do the nodes live on my Solo topology's t2.small?
Is there any way to install the lambda proxy in a different region than the datomic cluster?
I’m trying to use the pre-generate token
Cognito trigger so that I can put additional claims for data from Datomic into the idToken that Cognito hands back, but it appears that the Cognito Triggers only work with lambdas that are in the same region as the user pool. Unfortunately, in this case, my user pool is in us-east1, and my Datomic system is in us-east-2.
How are peeps doing granular application permission filtering on Datomic Cloud without d/filter
? I'd like to give my power users Datalog read-query access to whitelisted attributes, but I'm not sure how I'd do that safely.
For those of you using Datomic Cloud and looking for a solution to local development & testing or offline usage, I wrote this library https://github.com/ComputeSoftware/datomic-client-memdb which provides an implementation of the Datomic Client protocols for the Datomic peer in-memory database. We've been using it for about a month at my company and it has made local development and testing on the CI much easier.
I'm still getting d/with
Datomic Client Exception
with no error on CloudWatch running Solo topology after upgrading to client-cloud v0.8.63:
{:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}
Do I need to cycle in my stack?What version is your stack running server side? (i.e. what CFT did you launch your solo stack with). I will investigate further.
Is there anything like an undocumented alt-port
property that I could configure at my transactor, to let peers know that alt-host
also uses a different port?
@UBY44N2JG No, just alt-host
.
@UBY44N2JG under the “suggest a feature portal” located in the top right of your http://my.datomic.com account after login. If you don’t have a http://my.datomic.com account, please let me know and I can create one for you.
Thanks, @U1QJACBUM
I'm still getting d/with
Datomic Client Exception
with no error on CloudWatch running Solo topology after upgrading to client-cloud v0.8.63:
{:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}
Do I need to cycle in my stack?