Fork me on GitHub
#datomic
<
2019-01-07
>
hlolli16:01:20

Ah ok, as I changed the systemd service to user, found out my problem is totally unrelated. I start emacs from program runner and I'm guessing some environment variables are missing. Which explains why it works when I do it from the terminal. What (aws) variables do I need to include to connect to my datomic cloud?

marshall17:01:51

@hlolli depending a little on your setup, AWS_PROFILE can be sufficient. if you dont have profiles set up you’d need to have your Access key and secret key in envars one sec i’ll find you the aws docs

marshall17:01:18

usually easier to run aws configure and set up your profiles, then use AWS_PROFILE envar in the particular context you’re connecting from

hlolli17:01:42

Ok (on the train). I did provide the aws profile in the socks scripts. Now its just user space localhost tunnel, but i guess the config needs to know some vars. I repost in a bit.

marshall17:01:03

you can also pass a profile to the client configuration map

hlolli17:01:34

Yes I thought I did that. Maybe it cant find ~/.aws

marshall17:01:55

the class not found error looks more like a deps issue

marshall17:01:17

i.e. too old a version of clojure maybe?

hlolli17:01:23

the current error

2019-01-07 18:18:07.907:INFO::nREPL-worker-0: Logging initialized @23460ms to org.eclipse.jetty.util.log.StdErrLog
2019-01-07 18:18:07.929:WARN:oejusS.config:nREPL-worker-0: No Client EndPointIdentificationAlgorithm configured for [email protected][provider=null,keyStore=null,trustStore=null]
Syntax error (ExceptionInfo) compiling at (form-init7406940519592949202.clj:12:13).
Unable to connect to localhost:8182
my config
(def config
  {:server-type :ion
   :region "eu-west-1"
   :system "visitor"
   :creds-profile "hlolli-visitor"
   :endpoint ""
   :proxy-port 8182})
and my profile
$ AWS_PROFILE=hlolli-visitor aws configure list                                                                                               ~
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile           hlolli-visitor           manual    --profile
access_key     ****************PJ6Q shared-credentials-file    
secret_key     ****************m5Ze shared-credentials-file    
    region                <not set>             None    None

hlolli17:01:59

this all works if I run this trough $ clojure in the terminal btw, so environment is the only variable that's different.

marshall17:01:39

i don’t use nrepl, no idea how that would work with it

marshall17:01:15

that error does appear to be jetty related - makes me suspect version differences again how are you launching your repl when you’re not just running clojure in the terminal?

hlolli17:01:09

then with lein!

hlolli17:01:18

ok, so that could be a factor

hlolli17:01:53

booting cider now with clojure-cli...

hlolli17:01:24

my deps.edn includes only datomic, but leiningen whole bunch of server stuff

hlolli17:01:33

the same, it's either cider-nrepl problem or env problem here's with cider + clojure-cli

2019-01-07 18:43:21.942:INFO::nREPL-worker-0: Logging initialized @13446ms
ExceptionInfo Unable to connect to localhost:8182  clojure.core/ex-info (core.clj:4739)

marshall17:01:41

your socks proxy running on 8182?

marshall17:01:48

it does occasionally fail

marshall17:01:54

worth checking that it’s still up

kardan17:01:42

Don’t you need a query-group in your config?

hlolli18:01:37

I need to get more into this ion world, probably for those cases. I'm just starting out with datomic on a project.

kardan19:01:47

I just done the Ion tutorial, so my knowledge is a “bit” thin. Also spent almost all my time on Google cloud so all this Aws docs is entertaining 🙂

hlolli18:01:58

yeh, need to investigate, my journal

ssh -v -i /home/hlolli/.ssh/datomic-eu-west-1-visitor-bastion -CND 8182 [email protected][I DELETED]

Jan 07 18:18:07 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 2: new [dynamic-tcpip]
Jan 07 18:18:07 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 2: free: dynamic-tcpip, nchannels 3
Jan 07 18:41:10 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: Connection to port 8182 forwarding to socks port 0 requested.
Jan 07 18:41:10 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 2: new [dynamic-tcpip]
Jan 07 18:42:40 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: Connection to port 8182 forwarding to socks port 0 requested.
Jan 07 18:42:40 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 3: new [dynamic-tcpip]
Jan 07 18:43:21 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: Connection to port 8182 forwarding to socks port 0 requested.
Jan 07 18:43:21 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 4: new [dynamic-tcpip]
Jan 07 18:55:55 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: Connection to port 8182 forwarding to socks port 0 requested.
Jan 07 18:55:55 nixos c551cww67c98401xpp78xzwj6sfbljvn-unit-script-datomic-socks-proxy-start[1405]: debug1: channel 5: new [dynamic-tcpip]
sudo netstat -tulpn                                                                                                                                                    ~
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:8182          0.0.0.0:*               LISTEN      7986/ssh            
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      937/sshd            
tcp6       0      0 ::1:8182                :::*                    LISTEN      7986/ssh   

hlolli18:01:37

and here's my terminal where everything works fine

➜  visitor git:(master) ✗ clojure                                                                                                                         ~/Documents/visitor
Clojure 1.9.0
user=> (ns visitor.datomic.core
  (:require [datomic.client.api :as d]))
nil
visitor.datomic.core=> (def config
  {:server-type :ion
   :region "eu-west-1"
   :system "visitor"
   :creds-profile "hlolli-visitor"
   :endpoint ""
   :proxy-port 8182})
#'visitor.datomic.core/config
visitor.datomic.core=> (def client (d/client config))
2019-01-07 19:03:11.036:INFO::main: Logging initialized @23502ms
#'visitor.datomic.core/client
visitor.datomic.core=> client
#object[datomic.client.api.sync.Client 0x2fc698a9 "[email protected]"]
visitor.datomic.core=> 

sekao22:01:33

for datomic ion, is there any way to get a bigger instance than t2.small without going to production topology? or is the solo topology hard coded to use t2.small?

Joe Lane23:01:54

solo topology is build to use t2.small’s

sekao23:01:10

gotcha, thanks