-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
CIDER connects to remote nrepl server instead of localhost #3730
Comments
Thanks for the report! I might be wrong but it may be because we create a ssh tunnel that doesn't get destroyed after use, something like that. |
@vemv yes, when this bug happens there is a stray nrepl-tunnel process left. If I kill it with |
Nice! I've checked recent issues related to nrepl ssh tunnels and there wasn't one for this scenario specifically. I'm not immediately sure if disposing of this tunnel would be a universally good idea or technically feasible. (I'm not saying yes/no, just that I don't know). The safest PR that we'd welcome is one that closed the tunnel after all connections using it were closed and there wasn't something like a It still could use a defcustom so that the current behavior isn't changed - approximately like a feature flag. e.g. Of course, if all this was too much of a hassle, you could always just pick different ports for local/remote duties. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding! |
I don't think it's stale |
Steps to reproduce
cider-connect-clj
to a remote nrepl over SSH on port 65000cider-connect-clj
to local nrepl on port 65000 (same port as remote).Expected behavior
CIDER is connected to local nrepl server.
Actual behavior
CIDER is connected to remote SSH nrepl from step 1.
Environment & Version information
CIDER version information
CIDER 1.15.0 (Cogne), nREPL 1.1.0
Clojure 1.12.0-beta1, Java 21.0.3
Lein / Clojure CLI version
Clojure CLI version 1.11.3.1463
Emacs version
GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.5.2 (Build 22G91)) of 2024-06-01
Operating system
Mac OS 13.5.2
JDK distribution
openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment Homebrew (build 21.0.3)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.3, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: