Hello,
I have been looking at the threads here on this topic and read the documentation for integrating RStudio but still not having any luck.
Server and compute nodes: Rocky 8
Ondemand: 3.1.7
I have successfully installed the Rstudio app in my sandbox. I have the required software installed on the two test nodes: turbovnc, nc, python3-websockify and rstudio-server-rhel-1.1.463-x86_64.rpm.
I have built my RStudio singularity container, see def below:
Ensure that the guest is the same OS type as the compute hosts that it will run on
%post
# Update the package list and install dnf
microdnf install -y dnf
# Update the system
dnf -y update
# Install development tools and necessary libraries
dnf -y install wget.x86_64
dnf -y groupinstall "Development Tools"
dnf -y install perl-IPC-Cmd perl-Pod-Html
dnf -y install compat-openssl10
%labels
Maintainer OSC Gateways
%help
This will run RStudio Server which must be mounted with dependencies into the container
%apprun rserver
if ! [[ “$USER_PATH” = “” ]]; then
export PATH=“$USER_PATH”
fi
exec rserver “${@}”
%runscript
if ! [[ “$USER_PATH” = “” ]]; then
export PATH=“$USER_PATH”
fi
exec rserver “${@}”
What I have now is that the Rstudio app is starting and I can connect to it. However, it is presenting me with RStudio login screen. I thought the script.sh.erb was supposed to pass the generated password and user info to RStudio?
I know I’m close and looking to see if anyone here might be able to help me out?
Sounds to me like you’re not passing the CSRF token that Rstudio now requires.
You can see this pull request I made on our application to see what we did. Basically you need to generate a CSRF token in the before.sh.erb then pass it back to the view through conn_params then assign it to a cookie in view.html.erb so it gets passed to the origin server (rstudio).
Thank you, Jeff. I tried putting in just the CSRF lines, but unfortunately, I still get the RStudio login screen. What would be best to help troubleshoot this? Tar of my dev folder for rstudio or the output folder of the rstudio launch? Both?
I’d be quite sure it’s still the CSRF thing. I’m not sure you can upload tars here.
In any case - do you have the rstudio logs? They’d tell you what’s going on. You can see in that pull request how I configured OSC’s application to log to the staged directory where I can see them.
I use bc_osc_rstudio_server and log show 2024-11-22T02:42:00.260486Z [rserver] ERROR Failed to validate sign-in with invalid CSRF form; LOGGED FROM: bool rstudio::server::auth::common::validateSignIn(const rstudio::core::http::Request&, rstudio::core::http::Response*) src/cpp/server/auth/ServerAuthCommon.cpp:136