Permission error when running rstudio inside a singularity instance (Resolved)

Starting in early 2021, I started getting a new error when starting a new Singularity instance based on a rstudio docker image running in an HPC environment on CentOS. This issue was referenced in this thread

Here's the error I was getting:

ERROR database error 7 (sqlite3_statement_backend::loadOne: attempt to write a readonly database) [description: Could not delete expired revoked cookies from the database, description: Could not read revoked cookies from the database]; OCCURRED AT virtual rstudio::core::Error rstudio::core::database::Connection::execute(rstudio::core::database::Query&, bool*) src/cpp/core/Database.cpp:480; LOGGED FROM: int main(int, char* const*) src/cpp/server/ServerMain.cpp:729

I solved this by binding an address outside the container to /var/lib/rstudio-server when starting the instance as follows:

--bind $RSTUDIO_DB:/var/lib/rstudio-server

where $RSTUDIO_DB is just a path outside the container. I got this idea from this post.

Now my complete instance command looks like this:

singularity instance start \
      --bind $PROJECT_FOLDER:$PROJECT_FOLDER \
      --bind $SINGULARITY_LOCALCACHEDIR/tmp:/tmp \
      --bind $SINGULARITY_LOCALCACHEDIR/run:/run \
      --bind $RSTUDIO_DB:/var/lib/rstudio-server \
      $CONTAINER_PATH rserver --www-port ${PORT} --auth-none=0 --auth-pam-helper-path=pam-helper

And it works! I'm just posting here in case this will help someone else figure this out...

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.