-
Notifications
You must be signed in to change notification settings - Fork 24
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
Unable to start a remote REPL #54
Comments
That error means that the Julia executable binary has not been found on the remote host. To use the remote REPL, you need to have Julia installed remotely, and whatever shell you run when you ssh to the remote host has to be able to find Note that you can set |
Setting |
Maybe it's because of the distinction between interactive, non-interactive, login, and non-login shells? See this discussion — https://unix.stackexchange.com/questions/38175/difference-between-login-shell-and-non-login-shell — and I was being sloppy upthread when I said it has to be on the login shell's path. Snail just opens an ssh tunnel to the remote host. I'm not 100% sure what kind of shell that spins up (login? interactive?), but it probably does not run the same startup file that your normal interactive login shell does. As a quick test, you can try doing something like |
Yes, I think you are right. Doing Should Snail honor |
I looked at the manual entry for |
Well, I'll be... I guess I've always misunderstood that variable. I was thinking it was the reason that my I was just trying to think of a way to allow You've been very patient and kind. I hope you don't mind one last attempt on my part. Right now, you use the same |
There is more complexity if you have global configurations in I'm stressing this because it seems to me that you expect both interactive and non-interactive shells to have PS: Once we get to the bottom of this, I will update the documentation to clarify all this complexity. |
My old workflow for remote machines was to use M-x So, Snail's Our cluster does indeed manipulate I'm sorry that this devolved into you debugging my shell configuration... In the end, I think my best option is where this all started, with me setting |
This is pretty interesting. I expect setups like yours to come up somewhat frequently, and want to add guidance to the documentation. I just triple-checked, and bash definitely reads I did find a bug which occurs if you have a different default username configured for your remote host in Assuming that doesn't fix your problem, the next thing you should check is that |
Sorry, I don't think I explained myself clearly. I think the core issue is that when you run a command using The point of wrapping the command in
|
Well, as long as setting What if, in your if [[ ! $(shopt -q login_shell) && $- != *i* && -f /etc/profile ]]; then
. /etc/profile
fi This sources [[ ! $(shopt -q login_shell) && $- != *i* && -f /etc/profile ]] && . /etc/profile I couldn't quite test it, because on my test environment PS: I can only shake my head at POSIX shells in general and bash in particular. The check for an interactive shell is especially a thing of beauty. |
Wow! That snippet is wild, but it works! Snail can now find my remote Julia installation. Unfortunately, I now encounter a new error: julia> JuliaSnail.start(10011); # please wait, time-to-first-plot...
ERROR: IOError: listen: address already in use (EADDRINUSE) I've tried changing |
That error means port 10011 is in use on the remote host. Kill Snail and all tramp sessions. ssh into the remote host, and run When you say that you tried changing Hmm, I've actually been assuming that your cluster runs a recent Linux and OpenSSH combination. Can you please confirm that? |
I restarted Emacs entirely, checked for stray Julia processes, and still got the same error.
Yes, sorry, the
I believe we use CentOS.
|
Did a remote REPL ever work for you? It sounded from #54 (comment) like it did, but now it’s sounding like it never works. |
What if you set both |
No, it never did work for me. I was just doing M-x
I tried that, but no luck. |
While digging for reasons this problem occurs, I found another potential bug which affects Snail working with some (newer?) versions of emacs-libvterm and which may cause If that doesn't work, let's get to some real debugging. We need to get Emacs out of the picture and understand what happens with your ssh tunnel. You will use netcat (
echo '(reqid = "abcd1234", ns = [:Main], code = "println(\"hello world\")")' | nc localhost 10069 This should print If the Snail server fails to start on the remote host with the If the Snail server starts but there is no output in the Julia REPL from the netcat call, your tunnel is not being set up correctly. Maybe it's your local machine, maybe it's a firewall, maybe it's configuration, and maybe it's something else. Since I have no way to reproduce this situation, I cannot help any further. If everything works without Emacs, but does not work inside Emacs, then maybe your Snail installation is broken. Blow it away completely (delete from disk), reinstall from MELPA or GitHub, and restart Emacs. |
Woohoo! I pulled your latest bug fix with straight and it works! Thank you again for your help tracking down my issues. And thank you again for Snail! |
This issue has returned for me. I get the following output when I try to start snail remotely:
Creating a I tried to follow your debug steps above, and I can get through to step 6. When I run the
But the remote process prints the following out in an infinite loop:
Are there any changes to the debug steps I can try? Thanks! |
That looks like a broken Snail installation on the remote host. You're absolutely certain the error says |
You are right; it says |
I reproduced the problem. 👀 |
Something changed in the network IO code of Julia 1.8. While I figure out WTF broke between Julia versions and adapt Snail to deal with it, could you please try 1.7.x and see if that works for you? |
I was able to test with 1.7.2 on my remote system, and it does indeed work. |
Opening a separate ticket to track the new problem: #120 |
I was excited to hear about the new remote REPL capability. I was just giving it a try, but it fails to start the REPL. Here's what I see in my
*Messages*
buffer:My
julia-snail-executable
variable is still set to the default ofjulia
. If I launchvterm
manually, I can dowhich julia
successfully. I can also useshell-command
to runwhich julia
, and that works.I saw you had a
julia-snail-debug
variable, but when I set it tot
, I didn't get any additional output.Any thoughts on what is going on?
Thanks in advance for the help! And thanks for Snail!
The text was updated successfully, but these errors were encountered: