This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-07
Channels
- # announcements (3)
- # beginners (124)
- # calva (60)
- # cider (81)
- # cljs-dev (65)
- # cljsrn (1)
- # clojure (268)
- # clojure-dusseldorf (2)
- # clojure-europe (3)
- # clojure-italy (9)
- # clojure-losangeles (1)
- # clojure-nl (22)
- # clojure-russia (3)
- # clojure-spec (24)
- # clojure-uk (34)
- # clojurescript (72)
- # code-reviews (8)
- # cursive (20)
- # datomic (32)
- # fulcro (49)
- # jobs (1)
- # jobs-discuss (15)
- # juxt (10)
- # lein-figwheel (10)
- # nrepl (4)
- # off-topic (37)
- # overtone (1)
- # portkey (2)
- # protorepl (8)
- # random (1)
- # re-frame (1)
- # reagent (43)
- # reitit (8)
- # ring (16)
- # ring-swagger (2)
- # rum (6)
- # shadow-cljs (63)
- # specter (2)
- # testing (32)
- # tools-deps (32)
- # unrepl (1)
- # vim (3)
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?
@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
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html The first 2 there (access key id and secret access key)
usually easier to run aws configure
and set up your profiles, then use AWS_PROFILE
envar in the particular context you’re connecting from
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.
https://docs.datomic.com/client-api/datomic.client.api.html#var-client (the :creds-profile
key)
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 SslContextFactory@2ad85c43[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
this all works if I run this trough $ clojure in the terminal btw, so environment is the only variable that's different.
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?
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)
I need to get more into this ion world, probably for those cases. I'm just starting out with datomic on a project.
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 🙂
yeh, need to investigate, my journal
ssh -v -i /home/hlolli/.ssh/datomic-eu-west-1-visitor-bastion -CND 8182 ec2-user@[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
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 "datomic.client.api.sync.Client@2fc698a9"]
visitor.datomic.core=>