The Tensorboard app does not create the files, but the RStudio app creates the files correctly. The following are the files of the latest RStudio Session.
The Session Card again displays the following:
This app is missing information required to establish a connection. Please contact support if you see this message.
output.txt (6.9 KB)
Script.sh
#!/usr/bin/env bash
#Command Tracing
set -x
# Benchmark info
echo "TIMING - Starting main script at: $(date)"
module load tools/Apptainer/1.1.9-GCCcore-12.2.0
# Prepare environment based on submit type
RSTUDIO_SERVER_IMAGE="$OOD_SIF"
# Report SIF Image
echo ""
echo "The Following SIF Image Is Selected:"
echo "$RSTUDIO_SERVER_IMAGE"
echo ""
# Create Config File
echo ""
echo "Creating Config file"
echo ""
cat <<-EOF >./rserver.conf
server-user=$USER
www-port=${PORT}
auth-none=0
auth-pam-helper-path=${PWD}/bin/auth
auth-encrypt-password=0
auth-timeout-minutes=0
server-app-armor-enabled=0
EOF
echo ""
echo "Config file created..."
echo ""
# Create Session Config File
echo ""
echo "Creating Session Config file"
echo ""
cat <<-EOF >./rsession.conf
session-timeout-minutes=0
session-save-action-default=no
EOF
echo ""
echo "Session Config file created"
echo ""
# Create Log Config File (debug, info, warn, error)
cat <<-EOF >./logging.conf
[*]
log-level=info
logger-type=file
log-dir=$PWD/sessions
EOF
# Generate R Environment Site File
singularity -v exec --unsquash --bind="/tmp,$(pwd)" "$RSTUDIO_SERVER_IMAGE" bash ./genenv.sh
renv_path="$(cat ./Renviron.path)"
# Create RStudio Writable Directories and Helper Files
mkdir -p "$TMPDIR/rstudio-server/var/lib"
mkdir -p "$TMPDIR/rstudio-server/var/run"
uuidgen >"$TMPDIR/rstudio-server/secure-cookie-key"
chmod 600 "$TMPDIR/rstudio-server/secure-cookie-key"
# Setup Bind Mounts
BPath="/tmp"
BPath+=",$TMPDIR/rstudio-server/var/lib:/var/lib/rstudio-server"
BPath+=",$TMPDIR/rstudio-server/var/run:/var/run/rstudio-server"
BPath+=",logging.conf:/etc/rstudio/logging.conf"
BPath+=",rsession.conf:/etc/rstudio/rsession.conf"
BPath+=",rserver.conf:/etc/rstudio/rserver.conf"
BPath+=",Renviron.site:$renv_path"
BPath+=",sessions:${HOME}/.local/share/rstudio/sessions"
# Launch the RStudio Server
echo "TIMING - Starting RStudio Server at: $(date)"
if [ -n "$CUDA_VISIBLE_DEVICES" ]; then
singularity -v exec --unsquash --nv --bind="$BPath" "$RSTUDIO_SERVER_IMAGE" rserver
else
singularity -v exec --unsquash --bind="$BPath" "$RSTUDIO_SERVER_IMAGE" rserver
fi
before.sh
#!/usr/bin/env bash
# Export the module function if it exists
[[ $(type -t module) == "function" ]] && export -f module
# Export compute node the script is running on
host="$(hostname -s)"
HOST="$host"
export host HOST
# Find available port to run server on
port=$(find_port)
PORT="$port"
export port PORT
# Define a password and export it for RStudio authentication
password="$(create_passwd 16)"
PASSWORD="$password"
export password PASSWORD
# Setup TMP Dir
TMPDIR="$(mktemp -d -p "/tmp" -t "$USER-tmpdir-XXXXXX")"
TMP_DIR="$TMPDIR"
chmod 700 "$TMPDIR"
export TMPDIR TMP_DIR
# Setup XDG_RUNTIME_DIR
XDG_RUNTIME_DIR="$(mktemp -d -p "/tmp" -t "$USER-xdgrun-XXXXXX")"
chmod 700 "$XDG_RUNTIME_DIR"
export XDG_RUNTIME_DIR
# Load Form Information
OOD_SR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${OOD_SR}/form.sh" ]; then
# shellcheck disable=SC1090,SC1091
source "${OOD_SR}/form.sh"
fi
unset OOD_SR
RStudio related files
rserver.conf
server-user=<username>
www-port=22123
auth-none=0
auth-pam-helper-path=/home/<username>/ondemand/data/sys/dashboard/batch_connect/dev/bc_mod_rstudio/output/504faa90-15df-4d89-b45b-8225b7aa8d8c/bin/auth
auth-encrypt-password=0
auth-timeout-minutes=0
server-app-armor-enabled=0
rsession.conf
session-timeout-minutes=0
session-save-action-default=no
I believe that all files are created correctly. Where I could look for an error, however, is no longer clear to me. No, rsession.log
is not created, but rserver.log
:
2023-07-03T16:42:24.841399Z [rserver] INFO Reading rserver configuration from '/etc/rstudio/rserver.conf'
2023-07-03T16:42:24.849992Z [rserver] INFO Running as server user '<userrname>' (without privilege)
2023-07-03T16:42:24.854342Z [rserver] INFO Running without privilege; generating secure key at /tmp/rstudio-server/secure-cookie-key
2023-07-03T16:42:24.858131Z [rserver] INFO Reading database configuration from '/etc/rstudio/database.conf'
2023-07-03T16:42:24.861866Z [rserver] INFO Connecting to sqlite3 database at /var/lib/rstudio-server/rstudio-os.sqlite
2023-07-03T16:42:24.865078Z [rserver] INFO Creating database connection pool of size 20 (source: default maximum with 20 CPUs)
2023-07-03T16:42:24.870144Z [rserver] INFO Database schema has not been created yet. Creating database schema...
2023-07-03T16:42:25.009288Z [rserver] INFO No environment variables found at /etc/rstudio/env-vars
PS: I have replaced my username with <username>
due to our security regulations.
Thanks again