This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-15
Channels
- # announcements (1)
- # babashka (81)
- # beginners (48)
- # calva (49)
- # clj-kondo (52)
- # cljdoc (7)
- # cljs-dev (39)
- # clojure (33)
- # clojure-australia (18)
- # clojure-europe (48)
- # clojure-italy (2)
- # clojure-morsels (2)
- # clojure-nl (3)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # conjure (6)
- # cursive (3)
- # data-science (29)
- # datalog (4)
- # datomic (14)
- # events (1)
- # fulcro (1)
- # graphql (18)
- # gratitude (2)
- # helix (11)
- # introduce-yourself (2)
- # java (15)
- # keyboards (2)
- # lsp (6)
- # luminus (4)
- # membrane (32)
- # minecraft (1)
- # missionary (7)
- # nextjournal (2)
- # off-topic (28)
- # portal (28)
- # releases (1)
- # ring (1)
- # shadow-cljs (3)
- # sql (6)
- # xtdb (23)
Is it possible to do any network stack introspection in java? like getting the Socket-object using a certain port inside the JVM?
I just dropped a running Jetty server and had to restart the jvm for the nth time.
Yes, i drop the thread (running in the repl/development)
I start the server, then i loose the reference to the running server, cannot stop it and it blocks the port.
Yes. But the problem is that it easy to reload the namespace or similar and drop the server anyway. Defonce doesnt always work either.
*1
*2
and *3
are also your friends if you forget to hold it somewhere; but only if you remember to bind it or close it before you’ve entered 3 things in your REPL 🙂
I would just want to have the ability to go somewhere in jetty and kill everything. Or just interrupt the thread from the JVM or something similar.
you may be able to find something in jetty, if it holds things in a static variable or something… However it’s also a general problem, so better solved with general solutions. FWIW you’ll rarely lose the reference if you use a component system; something like integrant with its repl tools etc.
You can list all the threads and try to find the right one and interrupt it. You can also use advanced stuff like hotspot serviceability agent and do all sorts of crazy stuff but you don’t want that. I’d really question your project/workflow setup - once I got it right I’ve never had such problem or it was very rare and I could just restart the repl