Fork me on GitHub
#dirac
<
2016-12-10
>
tf005415:12:14

Hi, I am trying the dirac-sample for leaning how to use dirac for my other cljs proj., but haven't succeeded with the err msg like "Unable to bootstrap ClojureScript REPL due to a timeout." On repl console, I found the msg.

user=> Dec 09, 2016 3:04:03 AM clojure.tools.logging$eval436$fn__440 invoke
SEVERE: [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap timeout from client [WebSocketServerClient#1] :
 {:op :bootstrap-timeout}
I'm not sure the issue is caused by the timeout, but.. do anyone know how I could change the timeout param?

darwin15:12:00

@tf0054 I would first suggest looking at output from your Dirac Agent console

darwin15:12:21

we could also run agent with debug logging enabled to see more

tf005415:12:04

@darwin Thank you! I will check the Agent param for having debug logging.

darwin15:12:29

wait a bit, I have to find it, it is probably not documented well

darwin15:12:40

so what do you see now in your nREPL terminal (or agent terminal)

tf005415:12:05

@darwin Ah, I didnt write exactly but the quoted msg on my previous post was on the nREPL

darwin15:12:44

that was just a reaction to client timeouting, there should be something more interesting before it

darwin15:12:00

or run repl-dev if you are playing with the sample

tf005415:12:01

Hmm. I hope so, but whole msg is like

tf0054@ff204842e21b:~/work/dirac-sample$ lein repl
nREPL server started on port 8230 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha13
OpenJDK 64-Bit Server VM 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=>
Dirac Agent v0.8.5
Connected to nREPL server at .
Agent is accepting connections at .

user=>

user=> Dec 09, 2016 3:04:03 AM clojure.tools.logging$eval436$fn__440 invoke
SEVERE: [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap timeout from client [WebSocketServerClient#1] :
 {:op :bootstrap-timeout}

user=>

darwin15:12:12

hmm, not useful

tf005415:12:22

I agree 🙂

darwin15:12:10

@tf0054 ah, it would need checkouts, because “dirac.logging” is not part of the public release

darwin15:12:36

you should make it work with this: mkdir checkouts

darwin15:12:44

cd checkouts

darwin15:12:12

git clone

darwin15:12:43

git clone

darwin15:12:07

this should make lein repl-dev work

darwin15:12:25

I should probably package dirac.logging[1] with dirac library next time https://github.com/binaryage/dirac/tree/master/src/logging/dirac

tf005415:12:03

@darwin Oh. I see, but do you mean I need to compile the Chrome extension to get additional logs? I will try!

darwin15:12:20

I want to see what is happening on your nREPL + agent side

darwin15:12:28

at this point

darwin15:12:43

btw. the timeout should be 30s which should be more than enough

darwin15:12:20

you think it timeouts sooner than 30s in your case?

tf005415:12:48

Yes, normally it needs around 10sec.

darwin15:12:48

ok, try to run that lein repl-dev we will see more

tf005415:12:03

I feel the msg(Unable to bootstrap...) on Dirac console would be shown in 10sec, not 30sec

tf005415:12:12

Thanks I will

darwin15:12:48

chances are, that it does not respect the default from runtime prefs and uses this super-default 5s timeout: https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/nrepl_tunnel_client.cljs#L149

darwin15:12:14

let me check that real quick

tf005416:12:53

Oh.. I didnt know why but I could start repl-dev now (in "checkouts" dir) now according your advice.

darwin16:12:56

btw. that 30s timeout setting propagates on my machine (dev build): https://dl.dropboxusercontent.com/u/559047/dirac-agent-timeout-opts.png

darwin16:12:05

you don’t have to be in checkouts dir

darwin16:12:25

checkouts dir is a lein’s mechanism how to replace some deps with your “dev” versions

darwin16:12:49

we need dirac checkout because dirac.logging is missing in public dirac.jar

darwin16:12:13

I’m looking at the code and don’t see any reason why it should timeout early

tf005416:12:26

I am using the clojure on my docker container on win10 and win10:8080 is mapped to docker's 9977

darwin16:12:58

hmm, so the problem must be in the extension, it gets :bootstrap-info and probably throws or fails somehow

darwin16:12:19

can you look into devtools console of the dirac window? (change the type in extension prefs)

darwin16:12:16

@tf0054 just to make sure, are you using the latest Chrome Canary, right?

darwin16:12:55

btw. Docker is great, but you could be running into some networking issues as well

tf005416:12:25

I am using Chromium Version 57.0.2941.0 (64-bit) downloaded through your release note!

darwin16:12:30

are you docker run your container with —network=host ? or using the default bridge config?

tf005416:12:09

Sorry I will come back online in few hours, but now I have to go bc the cafe is closing now 🙂

darwin16:12:20

ok, np, see you then

darwin18:12:25

on a treadmill

darwin18:12:38

will be back in 30mmins

tf005418:12:29

Aw 🙂 nice.

darwin20:12:17

@tf0054 I’m back, you need port 8231 for agent connection (aka nrepl tunnel) and then 8232-8242 for weasel server(s), agent also needs to connect to nREPL server (8230), but that happens on the host machine so it should not be a problem in docker scenario

tf005420:12:55

@darwin I see. thanks! I appreciate your great support and am excited to have Dirac. The breakpoint is the thing I really want to use.

darwin20:12:14

cool, you are welcome

darwin20:12:35

btw. bleeding edge devtools could be buggy from time to time, better stick to latest versions or stick to specific chromium builds https://github.com/binaryage/dirac/blob/master/docs/faq.md#how-do-i-stick-to-a-particular-dirac-version

tf005421:12:11

I see and will use the extension installed locally. thanks!