Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling socket repl via system property causes failure #453

Closed
martinklepsch opened this issue Apr 16, 2016 · 3 comments
Closed

Enabling socket repl via system property causes failure #453

martinklepsch opened this issue Apr 16, 2016 · 3 comments

Comments

@martinklepsch
Copy link
Member

martinklepsch commented Apr 16, 2016

With the following env vars any boot invocation will fail due to multiple clojure runtimes trying to launch a socket repl on the same port.

BOOT_JVM_OPTIONS "-Dclojure.server.repl=\"{:port 5555 :accept clojure.core.server/repl}\""
BOOT_CLOJURE_VERSION "1.8.0"

Not sure if this can fixed with code, if not an addition to the docs might be a good idea.

@danielsz
Copy link
Contributor

I've added a workaround in the Wiki, Socket server

@alandipert
Copy link
Contributor

I don't see how we could ever support this, but it seems OK since if you have the boot runtime going, you have nrepl... so you can either use nrepl, or use nrepl just to start the socket server.

That said, I can imagine ways we can support it but they seem pretty out there. For example, we could add code to pods that interprets 5555 as the port to start on as pods come up, and each Clojure is assigned the next available port starting at 5555. Or maybe we could support our own BOOT_? option that specifies a pod name and the port to run its socket server on.

Any other ideas? Maybe there's a non-wacky thing we could do.

@danielsz
Copy link
Contributor

I think the general solution to this problem is to allow users to pass along configuration on a per pod basis. In this context, the socket server port is just a particular case. That said, I have no idea how easy or hard it is to implement. If possible, it looks worth a try. The hacky ways are not worth it, I think. We can always tell users to start the socket server via its API, in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants