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

ROBUSTNESS: Add assertion that the rserver process started #80

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago

Issue

Two users reported the following problem when we upgraded from RStudio Server 2022.02.4+500 to 2023.03.0+386:

$ rsc start --verbose
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/wynton/protected/home/legrand/nick/.local/share/rstudio/log/rserver.log'.
2023-03-30T17:46:24.296317Z [rserver] ERROR Unexpected exception: File name too long [system:36]; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:941

alice, your personal RStudio Server 2023.03.0+386 running R 4.1.3 is available on:

  <http://127.0.0.1:59507>

Importantly, if you are running from a remote machine without direct access to pdevel.example.org, you need to set up SSH port forwarding first, which you can do by running:

  ssh -L 59507:devel.example.org:59507 alice@login.example.org

in a second terminal from your local computer.

Any R session started times out after being idle for 120 minutes.
WARNING: You now have 10 minutes, until 2023-03-30 10:56:33-07:00, to connect and log in to the RStudio Server before everything times out.
Your password for this RStudio Server instance is: aq67I5mTxNEGYKtObS7j
Shutting down RStudio Server ...
Shutting down RStudio Server ... done
$

Suggestion

After launching RStudio Server, wait for the process to start, and possible a few more moments to give it time to fail, before reporting that it's available to the user.

HenrikBengtsson commented 1 year ago

Updated rsc start to check for startup failures. The above error should now give:

$ rsc start --verbose
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/wynton/protected/home/legrand/nick/.local/share/rstudio/log/rserver.log'.
2023-03-30T17:46:24.296317Z [rserver] ERROR Unexpected exception: File name too long [system:36]; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:941
ERROR: It looks like RStudio Server failed during launch ['rserver' process (PID 1423936 on hb-x1-2023) no longer exists]
Traceback:
1: assert_rserver_running() on line #804 in bin/rsc
2: main() on line #1633 in bin/rsc
Exiting (exit 1)

$