Skip to content

Troubleshooting Launcher and Kubernetes:
Verify Configuration Files#

Symptoms#

  • Unable to access the RStudio Server Pro home page
  • Unable to start new remote sessions in Kubernetes

Error messages#

When inspecting the log files for RStudio Server Pro, Launcher, and Kubernetes, you might see errors similar to the following:

RStudio Server Pro Home Page

Job information unavailable. Sessions are read-only.
Contact your administrator for help.

Error occurred while executing method (100)
Connection refused

void rstudio::core::http::TcpIpAsyncConnector::handleConnect(const rstudio_boost::system::error_code&, rstudio_boost::asio::ip::basic_resolver<rstudio_boost::asio::ip::tcp>::iterator) /var/lib/jenkins/workspace/IDE/pro-pipeline/v1.2-patch/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp:197

File: /var/lib/rstudio-server/monitor/log/rstudio-server.log

04 May 2020 03:36:03 [rserver] ERROR system error 111 (Connection refused); OCCURRED AT: void rstudio::core::http::TcpIpAsyncConnector::handleConnect(const rstudio_boost::system::error_code&, rstudio_boost::asio::ip::basic_resolver<rstudio_boost::asio::ip::tcp>::iterator) /var/lib/jenkins/workspace/IDE/pro-pipeline/v1.2-patch/src/cpp/core/include/core/http/TcpIpAsyncConnector.hpp:197; LOGGED FROM: rstudio::server::job_launcher::{anonymous}::ensureServerUserIsLauncherAdmin()::__lambda7::__lambda10 /var/lib/jenkins/workspace/IDE/pro-pipeline/v1.2-patch/src/cpp/server/ServerJobLauncher.cpp:678

Possible cause#

For RStudio Server Pro, Launcher, and Kubernetes to function properly, the configuration files should contain all of the required configuration values for RStudio Server Pro, Launcher, the Kubernetes plugin, and communication/mounts for Kubernetes.

The following troubleshooting steps will help you verify that you have created all of the necessary configuration files and input the required configuration values.

Troubleshooting steps#

Verify that the following configuration files exist:

  • /etc/rstudio/rserver.conf
  • /etc/rstudio/launcher.conf
  • /etc/rstudio/launcher.kubernetes.profiles.conf
  • /etc/rstudio/launcher.kubernetes.conf
  • /etc/rstudio/launcher-mounts

And verify that their contents match the default values in the documentation for integrating RStudio Server Pro with Kubernetes.

A full set of example configuration files is included below for reference. You can compare your configuration files to these examples and make any necessary changes to your configuration.

Example configuration: rserver.conf#

File: /etc/rstudio/rserver.conf

# Server Configuration File

www-port=80

# Launcher Config
launcher-address=127.0.0.1
launcher-port=5559
launcher-sessions-enabled=1
launcher-default-cluster=Kubernetes
launcher-sessions-callback-address=http://rstudio-server-pro:yourcompany.com:80
launcher-sessions-container-run-as-root=0
launcher-sessions-create-container-user=1

Example configuration: launcher.conf#

File: /etc/rstudio/launcher.conf

[server]
address=127.0.0.1
port=5559
server-user=rstudio-server
admin-group=rstudio-server
authorization-enabled=1
thread-pool-size=4
enable-debug-logging=1

[cluster]
name=Local
type=Local

[cluster]
name=Kubernetes
type=Kubernetes

Example configuration: launcher.kubernetes.profiles.conf#

File: /etc/rstudio/launcher.kubernetes.profiles.conf

[*]
default-cpus=1
default-mem-mb=512
max-cpus=2
max-mem-mb=1024
container-images=rstudio/r-session-complete:centos7-1.4.1106-5
default-container-image=rstudio/r-session-complete:centos7-1.4.1106-5
allow-unknown-images=1

Example configuration: launcher.kubernetes.conf#

File: /etc/rstudio/launcher.kubernetes.conf

api-url=https://kubernetes.yourcompany.com
auth-token=eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJyc3R1ZGlvIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImpvYi1sYXVuY2hlci10b2tlbi1nNXA2aiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJqb2ItbGF1bmNoZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJmZTk4N2MwNi1kZDRlLTRmZTktOTA0Yy1iZDY2MjAwNzIxNjIiLCJzdWIiOi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lvOVVGa1UvZ3N6TVpFYkM3VUhSSkdORG9MaS9aVnFucHFhMEJKM3JXeHl5WW93V3kyZwpPR2JGeFBHM0Y0ekloclFCeDNVQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFLSjN0eWtyRHZKUkFDVGc1dE50MGFia3dOVk4KL0JLVjUxb0Z5dnVkTGp6NjBOUGVrb0FwRHUxZFRsMzhiMmI4WFVVVTZ6Q2FmYTdtc2RZNDJZbmU5blpyMnI4KwpHZTJ4c1F2enRHSmljOGZjVGdma0xZczVkblF2S3hiWWdEVlFwVmQ0Y2JoRkRiZGJGaHI2M2VVU3JCZWptSjMvCnpCUDltb0VaekVDd0dudVY5WXVvV2UrZW5ZdDYvaVY5OTlDTWtrZW9kdTFoRlA5R1pwcGdtQWVWN0h4R2ZvaHcKWGhneWtDbGI2T0d2dWsvT05wdTc3S1JYSGhTYm00aFhVck1MNnJlenZpaDZyNWQxM1dBMzZCUE1XQUFjZUV5RwpOVGFGczN0dytrWHpXOENkSWdZa0pCTFFoMG1SYzlCMitqdUF0L1YwZlkrTElzUmdYeDZRZnFzUjZWYz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=

Example configuration: launcher-mounts#

File: /etc/rstudio/launcher-mounts

# Required home directory mount for RSP, Launcher, and Kubernetes
Host: 172.31.0.123
Path: /home/{USER}
MountPath: /home/{USER}
ReadOnly: false
Cluster: Kubernetes

Restart services and test#

After updating your configuration files, restart the RStudio Server Pro and Launcher services:

Terminal

$ sudo rstudio-server restart
$ sudo rstudio-launcher restart

Verify that the services are running and try to start a new session from the RStudio Server Pro home page.

If the services are still not starting or you are still experiencing errors when starting a new session, then proceed to
Step 6 - Skip Certificate Verification.