grst / rstudio-server-conda

Run Rstudio Server in a conda environment
MIT License
231 stars 48 forks source link

ERROR database error 7 #19

Closed IvanPalm closed 1 year ago

IvanPalm commented 3 years ago

I have installed rstudio-server on my Ubuntu 20.04 workstation few hours ago. I could run sessions locally on the default port 8787. So far so good.
While attempting to run the server from a conda environment I encountered your solution on SO so I closed all sessions, stopped the server, and followed the recommended procedure.
Could you please help me understanding the returned error? See the screenshot below.

Screenshot from 2021-10-28 11-23-51

I thank you in advance for your kind feedback.

matteodefelice commented 3 years ago

I have the same problem now, but I didn't have this with previous versions of this repository. The solution is this one btw: https://github.com/grst/rstudio-server-conda/issues/11

IvanPalm commented 2 years ago

Hi Matteo, thank you for your comment...and sorry for the late feedback.
I had tried that solution before writing the post, and I tried it again now on a fresh reinstall of rstudio-server 2021.09.1+372 (Ghost Orchid) for Ubuntu Bionic. The problem is that the database rstudio.sqlite does not exist in my system. I could locate rstudio-os.sqlite instead, so I made it writable.

Screenshot from 2021-11-17 11-04-39

The error remains.

Screenshot from 2021-11-17 10-54-31

Not sure what it's meant with "The better fix may be to give rstudio server the --database-config-file arg flag and provide a config file" in the post that you kindly linked. Where shall I pass that flag?

Finesim97 commented 2 years ago

You need to make sure, that the database file is owned by the correct user. (chown Ivan: ...)

eleozzr commented 2 years ago

I have installed rstudio-server on my Ubuntu 20.04 workstation few hours ago. I could run sessions locally on the default port 8787. So far so good. While attempting to run the server from a conda environment I encountered your solution on SO so I closed all sessions, stopped the server, and followed the recommended procedure. Could you please help me understanding the returned error? See the screenshot below.

Screenshot from 2021-10-28 11-23-51

I thank you in advance for your kind feedback.

I have the same problem

2022-01-24_11-08

This seems to be related to https://community.rstudio.com/t/permissions-related-to-upgrade-to-rstudio-server-open-source-1-4/94256/3 and rocker-org/rocker-versioned2#105

The directory /var/lib/rstudio-server contains the sqlite file (/var/lib/rstudio-server/rstudio.sqlite) which needs to be writeable by the user running the server.

I solved by

cd /var/lib/rstudio-server
sudo chmod 777 rstudio-os.sqlite ##or sudo username:username rstudio-os.sqlite  (here username is the user return by `whoami`)

And then run ./start_rstudio_server.sh 8483 (8483 is the port that you want, the default is 8787).

Then open your browser, and enter localhost:8483 or 127.0.0.1:8483, it works.

Hope this helps for you.

RainboWu commented 1 year ago

I've fixed that https://github.com/RainboWu/rstudio-server-conda/tree/master/local

grst commented 1 year ago

@RainboWu, sounds great, do you want to submit a PR?

Xethic commented 1 year ago

@grst I've created a simplified pull-request with a working fix, which is ready for review: #29

grst commented 1 year ago

Merged the PR, therefore closing this issue!