Fork me on GitHub
#datomic
<
2019-01-30
>
marshall13:01:02

Fixed. Thanks ^ !

Oleh K.14:01:52

I'm trying to develop via datomic-socks-proxy, but I cannot receive the most part of queries because of request timeout. I have a satellite internet and a big ping. How can I fix it?

okocim15:01:54

if you use the 1-arg form of d/q, you should be able to set a timeout that suits your needs:

(d/q 
  {:query '[:find ...] :args [db ...]
              :timeout 60000}) ; or whatever you need

Oleh K.18:01:37

Thanks, I just thought that if there is no timeout than it is maximized and therefore the problem is not in queries

Oleh K.18:01:16

Are there some defaults?

Oleh K.18:01:10

Seems strange to be forced to use 1 args form for local dev

Oleh K.19:01:21

I've checked, this timeout has nothing to do with my error

{:status -1, :status-text "Request timed out.", :failure :timeout}

okocim19:01:21

what’s the query that you’re running?

Oleh K.20:01:59

I'm sorry, the reason really was in my queries (I'm migrating from on-prem to the cloud), thanks for your time

eoliphant17:01:11

Hi. Running into an issue where cloud deployments are timing out that seems to be related to the number of lambda ions (~30). Temporarily Pulling some of them out of the config makes the problem go away. Is there any way to override the timeout?

joshkh18:01:22

i'm curious about recursive pull syntax. in the doc's example, we grab names of friends: [:person/firstName :person/lastName {:person/friends ...}] where by the ... refers back to the attributes in the parent data structure (i think?) in my case my root entity has a relationship to a node, and that node has a relationship to another node, and then a third node which is where i want to recur. i guess it would be like (:person/diary)->(:diary/contacts)->(person) instead of (:person/friends)->(:person/friends). is this possible?

miridius18:01:06

Hi there, I've got a datomic cloud instance running and I'm trying to connect to it from a client application running (on EB Tomcat) within the datomic VPC subnets. But when trying to connect I get the following exception:

Unable to connect to localhost:8182 {:cognitect.anomalies/category :cognitect.anomalies/unavailable, :cognitect.anomalies/message "Connection refused", :config {:server-type :cloud, :region "eu-west-1", :system "recipes-dev", :proxy-port 8182, :endpoint "", :endpoint-map {:headers {"host" ""}, :scheme "http", :server-name "", :server-port 8182}}}
Is it me or does it think it's running in ions and is trying to connect to localhost?

marshall18:01:41

@miridius You need to remove :proxy-port from your config map

miridius19:01:42

ah thanks, that would make sense since it's not using the socks proxy! I couldn't find anything about it in the docs though. Does the endpoint url stay the same?

marshall19:01:50

yep endpoint is the same

johanatan21:01:47

hi, does anyone have an example of including the datomic-pro peer library in deps.edn format (including the repository and login information for http://my.datomic.com) ?

johanatan21:01:07

https://my.datomic.com/account only includes it for maven and leiningen

okocim21:01:05

Is there any way to replicate the functionality of tx-report-queue in datomic cloud?

johanatan21:01:52

i suppose it would be the "Maven authenticated repos" section on the following page: https://clojure.org/reference/deps_and_cli giving that a try

johanatan21:01:13

hmm, getting 401 unauthorized even though i put my username and password in ~/.m2/settings.xml as directed

johanatan21:01:44

i tried both my-datomic-com and for server-id (matching in both server.xml and deps.edn)

johanatan21:01:00

any ideas/guidance?

Alex Miller (Clojure team)21:01:35

do you have any AWS env vars set?

Alex Miller (Clojure team)21:01:51

if not, try setting any valid AWS creds

johanatan21:01:00

yes, those are set to valid values

johanatan21:01:05

i get an AWS error otherwise

johanatan21:01:37

this is my actual invocation:

13:40 $ AWS_ACCESS_KEY_ID=`aws configure get personal.aws_access_key_id` AWS_SECRET_KEY=`aws configure get personal.aws_secret_access_key` clj -m core 

Alex Miller (Clojure team)21:01:03

ultimately here you’re trying to access a jar in an S3 bucket, and the deps resolver needs to access the bucket, which requires checking the bucket location (region), which is subject to IAM, and this is something I’ve seen be problematic before

johanatan21:01:56

is there an s3:// url i could try for it?

johanatan21:01:04

a la the "maven s3 repos" section

ghadi21:01:40

you might need to export those vars

ghadi21:01:45

clj launches a subprocess

johanatan21:01:49

ah, good call

johanatan21:01:32

nope. same result

Alex Miller (Clojure team)21:01:26

what do you have for your datomic repo in deps.edn?

johanatan21:01:36

{"" {:url ""}

johanatan22:01:04

this is interesting:

✘-1 ~/Documents/SourceCode/option-scanner/options-datomic [master|●1✚ 2] 
13:59 $ aws s3 cp deps.edn 
upload failed: ./deps.edn to  An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

johanatan22:01:32

perhaps my access keys need more s3 perms

Alex Miller (Clojure team)22:01:58

no, I don’t think that’s it

Alex Miller (Clojure team)22:01:14

what do you have the AWS keys set for?

Alex Miller (Clojure team)22:01:44

what you should have is a ~/.m2/settings.xml that looks like:

johanatan22:01:01

i am now just using the "default" aws credentials profile as specifed in ~/.aws/credentials

marshall22:01:56

are you running this locally on your laptop or on an EC2 instance?

johanatan22:01:00

here's my settings.xml:

<servers>

  <server>
    <id>my.datomic.com</id>
    <username>redacted</username>
    <password>redacted</password>
  </server>

</servers>

johanatan22:01:11

@marshall locally on laptop

Alex Miller (Clojure team)22:01:24

and deps.edn should look like:

Alex Miller (Clojure team)22:01:26

{:mvn/repos
 {"" {:url ""}}

 :deps
 {com.datomic/datomic-pro {:mvn/version "0.9.5786"}}}

Alex Miller (Clojure team)22:01:40

and you should need no AWS settings

johanatan22:01:32

yep, that's what i've got

johanatan22:01:02

here's the full deps.edn:

{:paths ["src" "resources"]
 :extra-paths ["resources"]
 :deps
 {clj-time {:mvn/version "0.15.0"}
  com.rpl/specter {:mvn/version "1.1.2"}
  aleph {:mvn/version "0.4.6"}
  org.clojure/clojure {:mvn/version "1.9.0"}
  com.datomic/datomic-pro {:mvn/version "0.9.5786"}
  org.clojure/data.json {:mvn/version "0.2.6"}
  com.cognitect/transit-java #:mvn{:version "0.8.311"}
  org.msgpack/msgpack #:mvn{:version "0.6.10"},
  com.cognitect/transit-clj #:mvn{:version "0.8.285"}
  com.cognitect/s3-creds #:mvn{:version "0.1.22"}
  com.amazonaws/aws-java-sdk-kms #:mvn{:version "1.11.349"}
  com.amazonaws/aws-java-sdk-s3 #:mvn{:version "1.11.349"}}
 :mvn/repos
 {"" {:url ""}}
 ;:aliases
 ;{:dev {:extra-deps {com.datomic/ion-dev {:mvn/version "0.9.186"}}}}
 }

johanatan22:01:13

[i'm no longer using ion so those two lines are commented out]

marshall22:01:24

what’s the error you get when you try to run it?

johanatan22:01:17

basically Unauthorized 401

marshall22:01:33

Could not transfer artifact com.datomic:datomic-pro:pom:0.9.5786 from/to http://my.datomic.com (https://my.datomic.com/repo): Unauthorized (401)

marshall22:01:55

the creds you put in your m2 settings are the ones from your http://my.datomic.com account dashboard?

johanatan22:01:20

could it be a problem with those creds somehow on the server side? i generated them about 4 weeks ago and haven't tried them until today

johanatan22:01:17

the username is an email address and the password is a UUID

Alex Miller (Clojure team)22:01:55

you can test directly in the browser

johanatan22:01:27

it worked with wget

johanatan22:01:32

so that's not the problem

Alex Miller (Clojure team)22:01:42

what version of clj are you using?

johanatan22:01:45

14:11 $ clj -Sverbose 
version      = 1.10.0.411
install_dir  = /usr/local/Cellar/clojure/1.10.0.411
config_dir   = /Users/jonathan/.clojure
config_paths = /usr/local/Cellar/clojure/1.10.0.411/deps.edn /Users/jonathan/.clojure/deps.edn deps.edn
cache_dir    = /Users/jonathan/.clojure/.cpcache
cp_file      = /Users/jonathan/.clojure/.cpcache/4079603067.cp

Clojure 1.10.0

johanatan22:01:35

i have to step out now. i'll check back again later

Alex Miller (Clojure team)22:01:01

for grins, I wouldn’t mind seeing you run that without the AWS creds

Alex Miller (Clojure team)22:01:00

also curious if that was your full settings.xml or just a snippet. full should have some stuff around what you posted

Alex Miller (Clojure team)22:01:51

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns=""
          xmlns:xsi=""
          ssi:schemaLocation="">

  <servers>
    <server>
      <id>my.datomic.com</id>
      <username>redacted</username>
      <password>redacted</password>
    </server>
  </servers>
</settings>

johanatan23:01:22

This was the problem. The missing outer <settings> which isn't mentioned on: https://clojure.org/reference/deps_and_cli I was creating this file from scratch as it didn't yet exist on my system.

Alex Miller (Clojure team)22:01:40

btw, your deps.edn worked for me and downloaded everything

Alex Miller (Clojure team)22:01:51

so I’m going to suspect settings.xml for now

lilactown22:01:16

at work, we're considering testing out Datomic On-Prem on our AWS stack. are there any recommendations on what storage service (rds, ddb, etc.) to use? Also, we currently are not allowed to use CloudFormation in our accounts; are there any resources on how to setup a transactor and peers outside of using CF?

Alex Miller (Clojure team)22:01:50

asking the dumb question - do you have a good reason to avoid Datomic Cloud?

Alex Miller (Clojure team)22:01:37

the datomic team could probably answer better but generally I think we would nudge you towards ddb over the others

donaldball22:01:40

Fair warning; running on-prem is moderately operationally complex. If none of the cloud restrictions are deal-breakers, I’d think you’ll probably have a better time with it esp. for experimenting.

lilactown22:01:48

@alexmiller I would love to use Datomic Cloud, but I have a feeling that it will be politically as well as operationally complex

lilactown22:01:47

our AWS account is not wholly owned by my team; we share one account for each environment (dev/qa/prod/etc.) with the entire organization 🙃

Alex Miller (Clojure team)22:01:35

That’s not necessarily an obstacle, might be worth considering as cloud is really the better choice technically and operationally between these options

lilactown22:01:14

I'm going to try and approach it on both fronts. I want to also explore the on-prem deploy in case I can't make headway with the cloud version

lilactown22:01:24

like I said, even use CF is not allowed for us atm 😕 the entire datomic cloud infra setup needs to be vetted by the team that handles the AWS accounts, services and architecture to see if it will behave well and should be allowed