What is the launcher-sessions-callback-address?
The launcher-sessions-callback-address is a crucial configuration value set in your Posit Workbench hosts' /etc/rstudio/rserver.conf, particularly when using the Launcher feature. It is used to specify the address of the Workbench server, so that the launcher sessions know which URL to communicate back to. The value that you set here must be reachable by all sessions, this includes both locally run sessions or seperate nodes/pods. In most cases, this will need to be set to the URL that users type into the web browser to access the login page for your Posit Workbench installation. This setting is required to ensure proper operation of the job launcher. Having this set incorrectly can cause network errors to populate the logs, and improper function of Workbench jobs.
How do I know if this is set correctly?
The first test we can perform to see if this is set correctly, is to open the Workbench jobs tab. If your launcher-sessions-callback-address is set incorrectly, you will see the message below:
A more accurate way to test this, involves starting an RStudio IDE session on Posit Workbench. From there, click on the terminal tab:
We can check the value currently set as our launcher-sessions-callback-address by running this in that same terminal tab:
echo $RS_SERVER_ADDRESSIn this example, we can see that it is set with the following value:
The most accurate test to validate the launcher-sessions-callback-address, is to simulate the running of a Workbench job using curl. A command to do so is below:
curl -X POST -d '{"method":"jobs_feature_available"}' -H "X-RS-Session-Server-RPC-Cookie: $RS_SESSION_RPC_COOKIE" $RS_SERVER_ADDRESS/job_launcher_rpc/jobs_feature_availableThis command simulates the process that Posit Workbench initiates when checking if Launcher jobs are available. It uses the same secure-cookie-key and launcher-sessions-callback-address value that's set in your /etc/rstudio/rserver.conf file.
Running this command in our scenario, we see a connection failure:
In this example, my host exists on http://localhost:8787, however, the launcher-sessions-callback-address is set to http://localhost. Let's change this value in our /etc/rstudio/rserver.conf to reflect this correct URL:
If this is set correctly, you will see an output like this:
{"result":true}This can also be seen below: