# Unable to launch fully containerized Rstudio

**URL:** <https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948>\
**Category:** Get Help\
**Tags:** question\
**Created:** [June 3, 2020, 3:34pm UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948 "2020-06-03T15:34:23Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![mcuma](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mcuma/32/171_2.png) [@mcuma](https://discourse.openondemand.org/u/mcuma)\
**Post date:** [March 3, 2021, 5:57pm UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948/21 "2021-03-03T17:57:18Z")

</div>

Thanks for the update, Michael. I did manage to get the RStudio Sever 1.3. working both locally and in the container. There are some Rocker containers that use 1.3 and R 4.0.x, so, that’s what we’re using now.

---

<div class="post-metadata">

**Author:** ![fenz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/fenz/32/496_2.png) [@fenz](https://discourse.openondemand.org/u/fenz)\
**Post date:** [June 17, 2021, 11:47am UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948/22 "2021-06-17T11:47:48Z")

</div>

I think I found a solution: [RStudio when launched without Singularity is having strange troubles with authentication - #32 by fenz](https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213/32)

---

<div class="post-metadata">

**Author:** ![groucho64738](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/groucho64738/32/721_2.png) [@groucho64738](https://discourse.openondemand.org/u/groucho64738)\
**Post date:** [October 14, 2021, 5:30pm UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948/23 "2021-10-14T17:30:46Z")

</div>

Hi. I’m having some authentication problems as well, but wanted to comment on the message @dugan made about the database config. I’m running rstudio-server-2021.09.0+351-1 and had the database issue. Here’s what I did to work around that (if it’s helpful to anyone else).

In the script.sh.erb file before launching rserver, I did a few things

```auto
**mkdir $TMPDIR/rstudio**
    - we set $TMPDIR with slurm automatically, but if you launch rstudio against $TMPDIR directly, it seems to set permissions to 1777 which we didn't like, making everything run in a subdirectory helped keep $TMPDIR 700.
**echo "directory=${TMPDIR}/rstudio" > $TMPDIR/rstudio/database.conf**
   - create a database.conf file pointing to where we want it and it will be unique to the job.
**set the server-data-dir, server-working-dir, database-config-file, and secure-cookie-key-file all to use the appropriate things in ${TMPDIR}/rstudio

```

I still can’t log into it, but I think that’s a topic being discussed in another thread.

---

<div class="post-metadata">

**Author:** ![guimaluf](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/guimaluf/32/285_2.png) [@guimaluf](https://discourse.openondemand.org/u/guimaluf)\
**Post date:** [October 27, 2021, 10:37am UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948/24 "2021-10-27T10:37:39Z")

</div>

This did not solve my issue as the singularity container could see `RSTUDIO_AUTH`. Anyhow, I’d like to share my findings.

I was running rstudio-server over singularity with this [repo config](https://github.com/guimaluf/bc_example_rstudio/commit/c0466f0a309b032ce6ef34e392154ce7921ac009) and by doing this I got the following error when launching the app and trying to using my login and RSTUDIO\_PASSWORD:

```auto
ERROR Could not find details for server user 'gb637'; LOGGED FROM: virtual
rstudio::core::ProgramStatus rstudio::server::Options::read(int, char* const*,
std::ostream&) src/cpp/server/ServerOptions.cpp:299

ERROR system error 2 (No such file or directory) [description: User not found.,
user-value: gb637]; OCCURRED AT rstudio::core::Error
rstudio::core::system::User::Impl::populateUser(rstudio::core::system::User::Impl::GetPasswdFunc<T>&,
T) [with T = const char* rstudio::core::system::User::Impl::GetPasswdFunc<T> =
std::function<int(const char*, passwd*, char*, long unsigned int, passwd**)>]
src/cpp/shared_core/system/User.cpp:68; LOGGED FROM: virtual
rstudio::core::ProgramStatus rstudio::server::Options::read(int, char* const*,
std::ostream&) src/cpp/server/ServerOptions.cpp:300

```

Investigating rstudio source code I came to the `getpwnam_r` function called by [`User::getUserFromIdentifier`](https://github.com/rstudio/rstudio/blob/51009f4cff7b0f45f9bd8762d7c0514b0de537bd/src/cpp/shared_core/system/User.cpp#L119) when retrieving user data [here](https://github.com/rstudio/rstudio/blob/51009f4cff7b0f45f9bd8762d7c0514b0de537bd/src/cpp/shared_core/system/User.cpp#L119).

That took me to how [RStudio uses PAM authentication](https://docs.rstudio.com/ide/server-pro/authenticating_users/pam_authentication.html) and by doing some tests with the Singularity container I noticed it was checking my user against `passwd` only, ignoring `sssd/ldap` configuration.

I’ve installed `rstudio-server-rhel-2021.09.0-351-x86_64.rpm` into the node server and overwritten `/etc/pam.d/rstudio` with `/etc/pam.d/login`. But with no success. Still getting the same error.

So I assume if one could find a way to make singularity container look at sssd authentication the container with newer versions of rstudio-server could work.

I’ve tested rstudio-server outside singularity container and it did work as is `getpwnam` from the node itself and not inside the container, thus being able to query sssd/ldap users.

Hope that information helps other with similar issues.

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948/25 "2022-05-26T15:42:44Z")

</div>



[Previous page](https://discourse.openondemand.org/t/unable-to-launch-fully-containerized-rstudio/948.md?page=1)
