This app is missing information required to establish a connection

Hi,
first of all thank you for the great product.

I’m trying to set up a purely container-based app for Tensorboard and RStudio, based on nmsu_hpc/ood_bc_rstudio.

I have configured all the files to match our site, but I always get the following feedback in the session card:

This app is missing information required to establish a connection

connection.yml was created and contains all data used in view.yml.erb. Unfortunately I don’t know in which logs I could still look for the error or missing Data the App wants.

Do you have an idea?

Thanks

Hello and welcome!

For the logs to check, there should be an output.log in the session information where you also see the connection.yml getting created.

Here’s an rstudio app we have at OSC that my also help:

Some of those files may help you, but at the moment with that error message it’s a bit vague. If that output.log is there could you post the contents?

Hi,

output.log is created, but unfortunately does not help me very much. I have attached the file but had to change it to a text file.

output.txt (6.7 KB)

I stopped the job after connection.yml was created. There is no further output until the job runtime is reached.

Thanks

And there’s no rsession.log either?

Yeah the output.log did not provide much as to what is going wrong.

Could you post the before.sh and script.sh as well so I can take a look at those too.

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

Seems like you ran into this issue. You don’t have a view.html.erb to show a button to connect to the application, seems like you named it incorrectly - view.yml.erb, should be .html.erb extension.

That was indeed the issue. I changed the file name and could afterwards connect to RStudio without any problems. A little embarrassing :wink:

Thank you very much

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.