Repository navigation
How to work remotely with a node behind a login server #469
Description
Activity
You could manually start radian and attach, and the vscode status bar could show the pid of the attached session?
Would you like to share
ls.str(.vsc)in your attached R session?Below is the output. $HOME is my home directory, and $WORk is a work directory (I did search/replace to the output)
attach : function () capture_str : function (object) check_null_dev : function () dataview_data_type : function (x) dataview_table : function (data) dir_extension : chr "$HOME/.vscode-R" dir_plot_history : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R/images" dir_session : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R" get_timestamp : function () globalenv_file : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R/globalenv.json" globalenv_lock_file : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R/globalenv.lock" homedir : chr "$HOME" new_plot : function () null_dev_id : Named int 2 null_dev_size : num [1:2] 10.1 10.1 path_to_uri : function (path) pid : int 190091 plot_file : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R/plot.png" plot_history_file : NULL plot_lock_file : chr "$WORK/seir_regression/TMP/RtmpvxGtqk/vscode-R/plot.lock" plot_updated : logi FALSE print.help_files_with_topic : function (h, ...) rebind : function (sym, value, ns) request : function (command, ...) request_browser : function (url, title, ..., viewer) request_file : chr "$HOME/.vscode-R/request.log" request_lock_file : chr "$HOME/.vscode-R/request.lock" rstudioapi_enabled : function () show_browser : function (url, title = url, ..., viewer = getOption("vsc.browser", "Active")) show_dataview : function (x, title, viewer = getOption("vsc.view", "Two")) show_globalenv : logi TRUE show_page_viewer : function (url, title = NULL, ..., viewer = getOption("vsc.page_viewer", "Active")) show_plot : logi TRUE show_view : logi TRUE show_viewer : function (url, title = NULL, ..., viewer = getOption("vsc.viewer", "Two")) show_webview : function (url, title, ..., viewer) tempdir : chr "$WORK/seir_regression/TMP/RtmpvxGtqk" unbox : function (x) update_globalenv : function (...) update_plot : function (...) wd : chr "$WORK/seir_regression"vscode status bar could show the pid of the attached session when the session is attached?
When I'm on the main server, the pid is updated. When I'm on the node it isn't.
Note that the remote ssh is to the server, not to the node. The files are served from the server. Since the directory structure on both is identical (other than /tmp), I can edit files and run things. But remote is connected to the initial server.believe this is the same issue I'm having in #552 .. like @michael-lachmann I too want to be able to use r session watcher on a compute node, not the login node that I initially Remote-SSH into.
One problem is that
login-node/tmp/is not the same ascompute-node/tmp/...To try and fix this, I added this line to my .Renviron to point the tmp dir to my $HOME directory:
TMPDIR="/home/cmr46993/tmp"I think we're almost to a fix because if I use
R: Create R Terminalnow, the plots pngs go here:
/home/cmr46993/tmp/RtmpNZ3ffC/and I do indeed see plots.BUT if I launch a new Terminal manually, connect to a compute node, and launch radian, the plots pngs go here:
/home/cmr46993/tmp/RtmpMmBQiz/but I don't see plots.And then if I launch yet another Terminal manually, I see a third tmp directory 😆
I hope you can think of a simple fix @renkun-ken because this will be a game changer for developing code for me and apparently others too :)
Actually, perhaps this issue is related to:
microsoft/vscode-remote-release#1722
There's currently no easy way to Remote SSH into an interactive session on a compute node.
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Is your feature request related to a problem? Please describe.
I am working remotely with a cluster. I log into the login server, and then request a node, to which I then log in. I manage to run remotely on the server, and see plots and help files. When I connect to the node, I do manage to start radian and attach. However, plots and help are not displayed.
I set the environment variable TMPDIR so that tempdir() points to a directory that is mounted on the login server. And that directory does work when used from the server. I can see that when I'm on a node, plots are generated inside that directory (and I can manually see them). But I can't have them automatically appear.
I did try to do ssh port forwarding with -R when loging into the node from the server. That didn't help. I'm not I did it correctly.
Describe the solution you'd like
I'd like to be able to work remotely in that setup
Describe alternatives you've considered
See above
Additional context