UCSF-CBI / rstudio-server-controller

RStudio Server Controller (RSC) - A Tool for Launching a Personal Instance of the RStudio Server
https://github.com/UCSF-CBI/rstudio-server-controller
ISC License
4 stars 2 forks source link

IDEA: Instead of 8787, maybe it's easier to mirror the --port=<port> in SSH port forwarding? #76

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago

Currently, we get:

$ rsc start 
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/xdg/xdg-ubuntu:/etc/xdg/rstudio/logging.conf'. Logging to '/home/henrik/.local/share/rstudio/log/rserver.log'.
henrik, your personal RStudio Server is available on <http://hb-x1-2023:24080>.
If you are running from a remote machine without direct access to hb-x1-2023, you can use SSH port forwarding to access the RStudio Server at <http://127.0.0.1:8787> by first running 'ssh -L 8787:hb-x1-2023:24080 henrik@log1.example.org' in a second terminal.
Any R session started times out after being idle for 120 minutes.
WARNING: You now have 10 minutes, until 2023-02-16 22:24:22+01:00, to connect and log in to the RStudio Server before everything times out.

That is, there are two different ports involved:

  1. 24080 - the default --port, which is generated by port4me
  2. 8787 - the hardcoded RStudio Server default

Instead of using 8787, we could use the same as in (1), so we get:

The advantage would be that we remove one possible source for mistakes. The disadvantage would be that it's not clear what the "left" and the "right" port in -L 24080:hb-x1-2023:24080 refer to.

HenrikBengtsson commented 1 year ago

Done; --localport=port is now the new default.