# RStudio Server Issues

**URL:** <https://discourse.openondemand.org/t/rstudio-server-issues/2063>\
**Category:** Get Help\
**Tags:** question\
**Created:** [May 12, 2022, 6:13pm UTC](https://discourse.openondemand.org/t/rstudio-server-issues/2063 "2022-05-12T18:13:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![brad.traver](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@brad.traver](https://discourse.openondemand.org/u/brad.traver)\
**Post date:** [May 18, 2022, 9:20pm UTC](https://discourse.openondemand.org/t/rstudio-server-issues/2063/9 "2022-05-18T21:20:50Z")

</div>

After for further tweaking, I managed to get RStudio Server to start. When I click the “Connect to RStudio” button, the RStudio login page comes up with the following error:  
Error: Temporary server error. Please try again.

My script is below:

```auto
#!/usr/bin/env bash

<%-
  session_dir = session.staged_root
%>

#
# Start RStudio Server
#
# PAM auth helper used by RStudio
cd $HOME
export WORKING_DIR=${HOME}/r_working
export RSTUDIO_AUTH="$/home/brad.traver/ondemand/dev/rstudio/template/bin/auth"
# Generate an `rsession` wrapper script
export RSESSION_WRAPPER_FILE="${WORKING_DIR}/rsession.sh"
mkdir r_working
cd $WORKING_DIR
echo $RSESSION_WRAPPER_FILE
(
umask 077
sed 's/^ \{2\}//' > "$RSESSION_WRAPPER_FILE" << EOL
  #!/usr/bin/env bash

  # Log all output from this script
  export RSESSION_LOG_FILE="${WORKING_DIR}/rsession.log"

  exec &>>"\${RSESSION_LOG_FILE}"
  set -x

  # rsession.sh doesn't share the same env as the outside script, so these
  # need to be set explicitly
  export R_LIBS_SITE="${R_LIBS_SITE}"
  export TZ="US/Eastern"

  env

  # Launch the original command
  echo "Launching rsession..."
  rsession --r-libs-user "${R_LIBS_USER}" "\${@}"
EOL
)
chmod 700 "${WORKING_DIR}/rsession.sh"

# Output debug info
hostname

# rstudio runtime stuff
export TMPDIR="$(mktemp -d)"

# server log directory in this job's working directory
mkdir -p "${WORKING_DIR}/logs"

set -x
# Launch the RStudio Server
echo "Starting up rserver... at $(date)"

rserver --www-port "${port}" --auth-none 0 --auth-pam-helper-path "${RSTUDIO_AUTH}" --auth-encrypt-password 0 --rsession-path "${RSESSION_WRAPPER_FILE}" --server-data-dir="${TMPDIR}" --secure-cookie-key-file "${TMPDIR}/rstudio-server/secure-cookie-key" --server-user=$(whoami) --database-config-file "/home/brad.traver/ondemand/dev/rstudio/template/etc/database.conf"

```

I think my issues might be caused by lack of configuration in the rsession and database config files. The database config file does have one line of configuration in it.

---

_[View the full topic](https://discourse.openondemand.org/t/rstudio-server-issues/2063)._
