- When
rscfails to check if a previous RStudio Server session is running on another host, because SSH fails, it will usepingto check whether the host is up and give a more informative error message based on the outcome.
- Now
rsc config,rsc log, andrsc passwordwork without requiring SSH access to the host where the RStudio Server is, or was, running.
rsc start --auth=auth-via-env --random-passwordwill no longer display the randomly generated password, if output is redirected. Instead, the user is asked to callrsc passwordto see it. This is done to prevent the password ending up in, for instance, a log file that is readable by other users on the same system.
- Add new environment argument
RSC_HELP_URL, which if set will be mentioned in the--helpoutput as well as being appended to any error messages produced.
-
Add option
--which=<values>forrsc config, which default to--which="rsc,rstudio,sessions", whererscdisplays the RStudio Server Controller settings,rstudiothe RStudio configuration, anduseron the RStudio sessions storage. -
Add option
--which=<values>forrsc reset, which default to support forrsc reset --which="rsc", which resets the RStudio Server Controller settings. Ifsessions, the user's RStudio sessions folder (e.g.~/.local/share/rstudio) to a dated tar file, and then remove that folder. This can be used as a last resort when the RStudio Server gets stuck at "R is taking longer to start than usual" after logging in. -
Add environment variable
RSC_RSESSION_TIMEOUT_SUSPENDto control whether a timed out R session should be suspended to disk. If1(default), it will be suspended to disk, otherwise not. -
Now
rsc configreports also on total directory sizes.
-
rsc resetdid not remove the internalrserver.pidandrserver_monitor.pidfiles. -
rsc configreported on file sizes with a stray trailing parenthesis.
-
Now
rsc logandrsc stopgive timestamp information on the internally recorded RStudio hostname, whenever they produce a warning. -
Now
rsc logproduces more informative warnings regarding on what host it thinks RStudio is running and the current machine.
-
Now the error message that
rsc stopproduces when it failed to stop an RStudio Server instance running on another machine, will report on both the machine where it thinks RStudio is running and the current machine. -
Now
rscassert that all files it creates are non-empty. This helps troubleshooting obscure errors, e.g. when user runs out of disk space.
rsc start --debugcould give anoperand expected (error token is "<pid>")error on some systems.
--port=randomand--port=uidare defunct.
-
Now
rsc startasserts that there are no stray 'rsession' processes running. -
Now
rsc statuswarns about stray 'rsession' processes.
-
rsc confignow also reports on RStudio User Configuration, e.g. the user preferencesrstudio-prefs.jsonfile. -
rsc configandrsc statusnow report on file sizes and modification timestamps.
-
Now
rsc configreports also onRSC_*environment variables. -
The default name of the login hostname suggested in remote SSH sessions can now be set via environment variable
RSC_SSH_LOGIN_HOSTNAME. The default is still to infer it fromwho.
rsc start --dryrunis now shortened to 10 seconds.
- When adding option
--debugtorsc startthe RStudio Server failed to launch.
rsc startwould generate obscure errors such asports.sh: line 15: [[:andport4me.bash: line 275: 3: Bad file descriptor. This was due to a teeny, but critical bug in port4me 0.7.0. Fixed by updating to new port4me 0.7.1.
rsc start --password=randomnow generates a password that can be copied by double-clicking on it. Technically, the password is now in a Base64 URL-safe encoding, whereas in the past it was Base64.
rsc startwould something fail to identified a TCP port as non-available, which resulted in an error from RStudio Server failing to launch. Fixed problem by updating to port4me 0.7.0 internally.
-
rsc start,rsc stop,rsc status,rsc reset, etc. give more informative error messages when the machine where RStudio Server was most recently running on is not longer available. -
rsc start --forcesuggests callingrsc reset --forceas a last resort if the machine, where RStudio Server was most recently running on, is not longer available.
rsc startreports also on the port used, if it fails.
-
If
rsc startfinds an.RDatafile, it will warn that R might fail to launch if the file is very large. -
Now
rscproduces an informative warning whenever it needs to SSH into another host to check whether a specific process is running there or not. This helps clarifying why users without SSH key-pair authentication setup have to enter their account password.
- Report also on the current host when
rscfails.
- Authentication methods
--auto=auth-via-su(default) and--auto=auth-via-sshdid not handle passwords starting with a hyphen (-), or that contained one or more dollar signs ($) or double quotation marks ("), if and only if, theexpectcommand was installed on the system. A user who entered such as password in the 'Sign in to RStudio' panel would always get anInvalid authentication (incorrect password)error.
- Previous bug fix did not work; the time-out error never took place.
rsc startandrsc statuswould stall if the RStudio Server was previously running on another host and that host no longer responds on SSH. Now it will timeout with an informative error message.
-
rsc startattempts to infer the login hostname from ``etc/hosts`, if it only finds an IP number at first. -
rsc startnow uses port4me 0.6.0, which is the most recent version, for identifying a free TCP port.
rsc startnow reports also on the underlying error message if one of the assertion tests for the R installation being functional fails.
- Shorten the path lengths of the RStudio Server
server-data-dirand databasedirectoryfolders by 17 characters.
- Now the default path to the internal RStudio Server data directory
can be configured via environment variable
_RSC_RSERVER_DATA_DIR_. This can be used as a workaround when the default data directory path is too long, which results in error[rserver] ERROR Unexpected exception: File name too long [system:36]; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:1033. If this, happens, settingexport _RSC_RSERVER_DATA_DIR_=$(mktemp -d)before callingrsc startshould work around the error.
- When the RStudio Server fails to launch, troubleshooting information related to known problems is part of the error message.
rsc startnow waits up to 10 seconds for the RStudio Server to respond on 'http://127.0.0.1:'. If it fails to respond, a informative warning is generated. It then continues to assert that the server process is still running, before outputting the instructions on how to connect. This strategy should avoid outputting instructions that doesn't work if the RStudio Server fails to launch for one reason or the other.
rsc --version --fullnow also reports on the location of the RStudio Server and R executables.
rsc startnow reports on the RStudio Server and R versions.
rsc startnow makes sure that also R is a working state, before launching the RStudio Server instance. This is done by verify thatR --version,R --help, andR --vanilla -e 42run without an error code.
- The instructions for SSH port forwarding now suggests to use the same port number on local host as used by the RStudio Server instance. Previously, the port was hard-coded to 8787, when using SSH port forwarding. This simplifies the instructions, because only one port number is involved. It also makes the instructions for connection directly on the machine and remotely use the same port, which removes one potential point of confusion.
-
Add command-line option
--localportfor specifying the local port that binds to the port on the remote machine where the RStudio Server is running, if it runs remotely. The special case--localport=port(new default) will use the same port as specified by--port. -
rsc startnow skips instructions for setting up SSH port forwarding when it cannot detect if running from an SSH connection.
- Cleaned up and clarified
rsc startinstructions.
- The connection URL given in the
rsc start --revtunnel=<spec>instructions did not have a hostname or a port.
-
The error message produced by the internal
assert_no_rserver()function when it detects a strayrserverprocess running suggested onlykill <PID>. Now it suggestskill -SIGTERM <PID>, andkill -SIGKILL <PID>as a last resort. -
ROBUSTNESS: Declaring more local variables as integers.
rsc status --fullwould give an errordu: cannot access ' .../.local/share/rstudio/sessions/active/*/suspended-session-data/': No such file or directoryif there were no suspended RStudio Server session.
-
Now
rsc configreports also on the RStudio User State Storage folder. To get a details summary on what is stored in this folder, seersc config --full. -
Now
rsc status --fullreport also on the CPU usage, RAM usage, status, and start time for the rserver, rsession, and the rserver monitor processes, if they are running.
-
Now
--port=port4me(default) generates a different port than previously. The reason is that a new algorithm, port4me, is used to generate the user-specific, pseudo-random, but deterministic port. Previously, a Python-based implementation was used. The new behavior corresponds to--port="$(port4me --tool=rsc)". -
Dropped command-line option
--port-seed=<seed>, since--port=randomis deprecated and defaults to--port=port4me. -
Python is no longer needed for this tool.
-
Removed prototype
freeport. Use the port4me tool instead.
- ROBUSTNESS: Now declaring integer type for local variables, whenever possible.
--port=randomand--port=uidare deprecated and equal to--port=port4me.
- If
rsc stopcould fail to terminate some processes, e.g.rserverorrsession. Now it attempts multiple times before giving up with an informative warning. It attempts four times withSIGTERMsignals with three seconds in-between. If those fail, it tries one last time with the strongerSIGKILLsignal.
-
When using
rsc start --auth=auth-via-env --random-password, the password is now display at the very end, instead of at the beginning. -
rsc startnow highlights URLs and temporary passwords in output, if the terminal supports it. -
rsc status --fullwill show information how to reconnect to an already running RStudio Server instance. -
The error message produced by
rsc startwhen an instance is already running now suggests callingrsc status --fullfor instructions on how to reconnect.
rsc startandrsc statuscould report on the incorrect hostname of the machine where the RStudio Server instance is running, e.g. when launched via an interactive Slurm job.
- The warning and error messages on stray 'rserver' processes will now include instructions on how to terminate such processes.
- For security reasons, environment variable
RSC_PASSWORDis never exported to any of the R sessions running via the RStudio Server. Likewise, it is never written to the config files or any temporary file.
- Environment variable
RSC_PASSWORD=randomnow corresponds to specifying command-line option--random-password.
-
Now
rsc statusreports also on the optional SSH reverse tunnel. -
The
rsc startmessage now not only specifies for how long, but also until what time the user has to connect and log into to the RStudio Server before everything times out.
- When using
rsc start --revtunnel=<spec>, the startup message did not including messages about timeout limits.
-
The
rsc startupstartup message now includes "WARNING: You now have 10 minutes to connect to the RStudio Server and start the R session before everything times out". -
Increased the RStudio Server timeout to 10 minutes.
-
Now timeout warnings reports also on the time point when the timeout shutdown will take place.
- The RStudio Server timeout did not apply if the user never logged.
-
The RStudio Server will automatically terminate 5 minutes after the most recent R session was terminated. An R session may be terminated either by the user (e.g. calling
quit()in R), or from timing out because it has been idle for more than two hours. In other words, the default behavior is to automatically shut down everything after the user having been idle for more than 125 minutes. -
The timeout limit of an R session is now two hours regardless of how the RStudio Server is running. Previously, this timeout limit would be overridden by the maximum runtime of the job scheduler, but in order to avoid jobs running idle for a long time, locking up slots of the scheduler, we choose to time out everything regardless of requested run time.
-
Now
rsc --version --fullreport on the version forrsc, RStudio Server, and R. -
rscnow respected environment variableNO_COLOR. Set it to any non-empty value to disable colored output. -
rsc statuswill now warn against strayrserverprocesses that are running despite no existing lock and PID files.
-
In rare cases there can be stray
rserverprocesses running that where launched byrsc start. Investigation showed that the PID files for such processes do not exist, e.g.rsc statuswould report that nothing was running. Nowrsc startchecks for such stray processes before attempting to start another RStudio Server instance and gives an informative error message if detected. -
In the rare case that
rsc startfound a free random port that immediately after was found to be occupied, it would output the an obscureERROR: Not an integer: ERROR: [INTERNAL]: Identified port is not free: 4321message. Now it reportsERROR: Identified a free port, which now appears to be occupied: 4321.
rsc startwould output "rsc: line 825: kill: (30801) - No such process" when terminated viaSIGINT(e.g. Ctrl-C).
rsc stopdid not stop the SSH reverse-tunnel connection, if called, which prevented thersc start --revtunnel=<host>:<port>call from terminating.
- The
$HOME/.config/rsc/var/run/rstudio-server/folder and its subfolderrstudio-rsessionfolder were writable by anyone on the system (777 in Unix terms). Therserverprocess sets these file permissions by design, because these folders are meant to be used by different users on the system. This would not have been a problem if the$HOME/.config/rsc/folder would be fully private to the user (700 in Unix terms), but due to a thinko, that folder was accessible and readable by anyone. Combined, this could lead to anyone on the system being able to write to the above folders. We now make sure$HOME/.config/rsc/is fully private. Also, sincerscis only used to launch a personal RStudio Server instance, we recursively set all of its files and folders private too (700).
-
Using
rsc status --no-sshwill skip attempts to SSH into another machine to check if the rserver is running there. -
Now
rsc reset --forcewarns if critical rsc-related files exists, and which they are, otherwise the cleanup is silent.
- Add
freeport.
rscfailed if called via a symbolic link.
--port=uidis the new default.
-
Add option
--quietto silence the instructions. -
Now
rsc startoutputs a message when it shuts down the RStudio Server. -
Now
rsc startshuts down nicely when it receives aSIGCONT,SIGTERM,SIGUSR2, orSIGINT(e.g. Ctrl-C) signal. -
Add built-in 'auth-via-ssh' authentication tool that use SSH toward a hostname to validate the password, e.g.
--auth=auth-via-ssh:log2. -
Now
rsc start --auth=<spec>gives an informative error message if the<spec>is incomplete, e.g. when the 'expect' tool is missing. -
Add
--random-password, which setsRSC_PASSWORDrandomly and echoes it. This can be used in combination with--auth=auth-via-env.
- Add
rsc start --revtunnel=<spec>.
-
Add support to specify an alternative authentication method for the RStudio Server login, e.g.
rsc start --auth=<file>, where<file>can be the path to an executable, or one of the built-in ones, which are 'auth-via-su' (default) and 'auto-via-env'. -
rsc status --field=hostnameandrsc status --field=portreport on the hostname and the port of the running RStudio Server. -
rsc status --force --field=...skips any attempts to check and clean up stray files. -
rsc statusnow reports also on the RStudio Server's listening port. -
Now
rsctries extra hard to infer the hostname, which is done by first querying$HOSTNAMEandhostnameas a fallback. If neither works, then an informative error is produced. -
Now
rsc reset --forceproduces an informative warning. -
Added
rsc wait, which waits untilrsc start &is fully running.
rsc startno longer usesmktempin case that fails, which, by the way, is extremely rare and a problem with the system setup.
- Add option
--env-pattern=<regular expression>.
- Remove option
--envin favor of--env-pattern.
- Internal
check_pid()could give incorrect results when checking a process PID on another machine.
rsc startfailed to remove stray lockfile, even when it was known that there were no 'rserver' and 'rsession' processes running.
-
Now
rsccan check process PIDs on another machine as well, which requires SSH access to that other machine. -
Now
rscrespects environment variableXDG_CONFIG_HOME. If not set, the default is$HOME/.config.
- Add option
--env=<spec>. If--env=all, then the R session, and any terminal opened in RStudio, inherits all environment variables that were exported in the shell wherersc startwas called. If--env=none, then only environment variables predefined by the RStudio Server are set.
-
rscwould incorrectly remove the lock file when the RStudio Server was running on another machine on the same system. -
rsc statusreported that 'rserver' and 'rsession' were not running when called on another machine than where they are running.
-
Add support for
--port-seed=<seed>, which sets the random seed used when finding a free, random port (--port=random). -
Add support for
--port=uid, which is short for--port-seed=$(id -u)and--port=random. This makes the sequence of random ports tests deterministic and unique to the current user. This strategy increases the chance for a user to get the same port in subsequent calls. -
Add support for
--dryrun, which does everything but launching the RStudio Server. This is useful for troubleshooting and development. -
Now
rscremoves stray PID and lock files, if it can be concluded that they are stray files.
-
rsc startnow ignores a stray lock file if there is no other evidence that an RStudio Server instance is running. -
rsc startnow detect when RStudio Server fails to launch and gives an informative error message. -
rsc startnow asserts that the port is available before trying to launch the RStudio Server.
-
rsc startinstructions include information on$USER. -
rsc statusreport on the lock file too. -
rsc statusnow reports on "unknown" statuses if the RStudio Server is running on another machine.
-
rsc startfailed to shut down nicely when receivingSIGTERM, resulting in R sessions and lock files being left behind. -
src stopwould fail on machines where environmentHOSTNAMEis not correct. Now relying onhostnameinstead.
- If
rsc startfails because there's already an existing RStudio Server running, the error message now includes on what machine that instance is running.
- Internal validation of
auth-via-sucould output messages to standard error. Those are now muffled.
-
Now
rsc startonly gives instructions how to access the RStudio Server instance from a remote machine, when connected from one. -
Now the
rsc startinstructions on how to connect from a remote machine infers the login hostname from the current connection by queryingwhoandhost. -
When running the RStudio Server via an interactive job, then the R session timeout limit is inferred from maximum run-time as given by the job scheduler. If this cannot be inferred, the timeout limit defaults to 120 minutes.
rsc stopcalled from another machine on the same system would silently remove the internal lock file used to prevent more than one RStudio Server instance from running. Now an informative error message is produced informing on what machine the server is running and need to be stopped from.
- Now the
auth-via-suscript is distributed part of this software.
- Environment variable
R_LIBS_USERwas ignore.
rscno longer loads Linux environment modules. Instead, the user is responsible for making sure R and RStudio Server executables are on thePATH. This gives the user maximum flexibility in what R version to run. Thersctool will produce informative error messages if these executables are not found.
-
Add
rsc config --full. -
Add
rsc log. -
Now
rsc startwill make sure to terminate the RStudio Server instance and any running R sessions when exiting.
-
Add
freeportto find a free TCP port. -
Add
launch_rstudio_server, which launches the RStudio Server on the current machine at a random port. The server and any running R session it launched will be terminated whenlaunch_rstudio_serverterminates, e.g. from Ctrl-C.