Unable to connect to service on rstudio server on debian

I just set up a debian server on linode. I want to run rstudio server but I am getting an error telling me that it can not connect to service. After running systmctl status rstudio-server i get this error:

ERROR system error 13 (Permission denied) [path: /home/user/.local/share/rstudio, target-dir: ]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared_core/FilePath.cpp:838; LOGGED FROM: int main(int, char* const*) src/cpp/session/SessionMain.cpp:2020

I tried following this instructions without any success, what can I do?

I would check if your user has access to the folder (or if the folder event exists):/home/user/.local/share/rstudio. Try creating it manually using mkdir -p /home/user/.local/share/rstudio on the shell. If it fails then you might have a permissions issue that needs to be solved on the filesystem.

Also check if you need to run the systemctl start command as sudo.

1 Like

Thanks! Now I'm getting error during transmission on my server. The output of systemctl status is:

ERROR system error 9 (Bad file descriptor); OCCURRED AT rstudio::core::Error rstudio::core::system::user::socketPeerIdentity(int, rstudio::core::system::user::UserIdentity*) src/cpp/core/system/PosixUser.cpp:58; LOGGED FROM: virtual bool rstudio::session::LocalStreamHttpConnectionListener::validateConnection(rstudio_boost::shared_ptr<rstudio::session::HttpConnectionImpl<rstudio_boost::asio::local::stream_protocol> >) src/cpp/session/http/SessionPosixHttpConnectionListener.cpp:89

Hmmm, that doesn’t seem right.

Are you running the rstudio server process as root? To me, I usually get this when I don’t run as root and have the wrong permissions.

If you could provide the exact shell commands and otuput you are running it will be helpful.

Yes, I am root. I tried removing and reinstalling it and am still getting the same error.

gdebi rstudio-server-2021.09.1-372-amd64.deb  && systemctl enable --now rstudio-server && systemctl status rstudio server > log_rstudio_status.txt
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done

RStudio Server
 RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Do you want to install the software package? [y/N]:y
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
  c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
(Reading database ... 82676 files and directories currently installed.)
Preparing to unpack rstudio-server-2021.09.1-372-amd64.deb ...
Unpacking rstudio-server (2021.09.1+372) over (2021.09.1+372) ...
Setting up rstudio-server (2021.09.1+372) ...
useradd: user 'rstudio-server' already exists
Created symlink /etc/systemd/system/multi-user.target.wants/rstudio-server.service β†’ /lib/systemd/system/rstudio-server.service.
● rstudio-server.service - RStudio Server
   Loaded: loaded (/lib/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2022-01-16 01:00:54 UTC; 1s ago
  Process: 22158 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
 Main PID: 22159 (rserver)
    Tasks: 3 (limit: 2359)
   Memory: 8.6M
   CGroup: /system.slice/rstudio-server.service
           └─22159 /usr/lib/rstudio-server/bin/rserver

 rstudio-server.service - RStudio Server
   Loaded: loaded (/lib/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2022-01-16 01:00:54 UTC; 1min 47s ago
 Main PID: 22159 (rserver)
    Tasks: 3 (limit: 2359)
   Memory: 9.1M
   CGroup: /system.slice/rstudio-server.service
           └─22159 /usr/lib/rstudio-server/bin/rserver
rsession-adrian[22260]: ERROR system error 9 (Bad file descriptor); OCCURRED AT rstudio::core::Error rstudio::core::system::user::socketPeerIdentity(int, rstudio::core::system::user::UserIdentity*) src/cpp/core/system/PosixUser.cpp:58; LOGGED FROM: virtual bool rstudio::session::LocalStreamHttpConnectionListener::validateConnection(rstudio_boost::shared_ptr<rstudio::session::HttpConnectionImpl<rstudio_boost::asio::local::stream_protocol> >) src/cpp/session/http/SessionPosixHttpConnectionListener.cpp:89

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.