5 Service Administration
5.1 Running the Service
Once configured, you can run the Job Launcher via service by executing the command
sudo rstudio-launcher start. The Launcher service needs root privilege for performing authentication and authorization, as well as providing any child plugin processes with root privilege (as needed). After initial setup, the Job Launcher lowers its privilege to the server user (see Configuration Options for more information).
If the Job Launcher service fails to start and continue running, one of its plugins exited in failure and is likely not configured properly. It is often easier to run the Job Launcher in the terminal directly when getting it set up for the first time so you can more easily see any reported errors and more quickly test configuration changes. In order to run from the console, execute the command
sudo /usr/lib/rstudio-server/rstudio-launcher. If you are still having troubles starting the service, see Logging and Troubleshooting.
If the Launcher was installed from outside of RStudio Server Pro, the Launcher service is not automatically configured to start on system startup, and you must enable this manually if desired by using the following commands:
systemctl enable rstudio-launcher.service
chkconfig --add rstudio-launcher
5.2 Service Account Permissions
The Job Launcher runs as the system root user during startup and then drops this privilege and runs as a more restricted user.
The user account that the Job Launcher runs under in normal course of operations is
rstudio-server. This account is automatically added to the system when RStudio Server Pro is installed, and is created as a system rather than end user account (i.e. the
--system flag is passed to
You can configure the Job Launcher so that it will run from an alternate account with the following steps:
- Create a new system user (if the one you want to use doesn’t already exist)
- Assign this user to the
server-useroption in the
- Restart the Job Launcher service
For example, to shutdown the server and create a new system user named
rs-user, you’d use the following commands:
sudo rstudio-launcher stop sudo useradd --system rs-user
Then edit the
/etc/rstudio/launcher.conf configuration file as follows:
Finally, restart the Job Launcher to begin running under the new user:
sudo rstudio-launcher restart
5.3 Logging and Troubleshooting
By default, the Job Launcher and its plugins write logs to the system logger. If the service fails to start, check the system log to see if there are any errors, which should help you determine what is going wrong. In general, errors are usually a result of misconfiguration of the Job Launcher or one of its plugins. When initially setting up the Launcher, it is sometimes helpful to run it directly from the command line, as opposed to running it via the service. See Running the Service for more information.
When running into issues that you are unable to resolve, make sure to enable debug logging for the Job Launcher by adding the line
/etc/rstudio/launcher.conf. This will cause the Launcher and all of its plugins to emit debug output. This debug output can be seen on the console (if running the Job Launcher manually in the terminal), or in a debug log file located under the
/var/lib/rstudio-launcher folder for the Job Launcher service, and under the plugin’s subdirectory for plugin-specific logging.