Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rstudio-server unable to connect to service

While login to Rstudio Server with my user name and password, I received the following

Rstudio Initilization Error 
unable to connect to service

I installed Rstudio Server in the following way:

apt-get install gdebi-core r-base r-base-dev 
wget -c https://download2.rstudio.org/rstudio-server-0.99.489-amd64.deb
sudo gdebi rstudio-server-0.99.489-amd64.deb

sudo usermod -a -G rstudio lorencm
sudo service rstudio-server start

id  lorencm
uid=1000(lorencm) gid=1000(lorencm) groups=1000(lorencm),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),111(sambashare),999(docker),1001(rstudio)

What did I do wrong?

like image 264
user977828 Avatar asked Nov 10 '15 08:11

user977828


People also ask

Could not connect to the session on RStudio server?

One of the things that make “unable to establish connection with r session” an unusually hard error message to fix is that it has more than one cause. Three known causes are interference from an anti-virus program, running RStudio as an administrator, and even a Rscript file trying to autosave.

How do I start RStudio server from terminal?

You may start R‑Studio for Linux from the terminal using the following command: For R‑Studio for Linux : rstudio . For R‑Studio for Linux Technician : rstudio-tech . Note: You need to elevate your privilegies if you're not the root to start R‑Studio for Linux .


1 Answers

In my experience this might happen because of permission to your home directory or you don't have any home directory. possibly created by defauly with no home directory. to solve this, just create a home directory for the username that you are tryin to use or use an exisiting username with valide home directory

usermod -md /home/username username 

or just create one

sudo mkdir /home/username
sudo chown -R username /home/username

Good luck

like image 63
Ayman Salama Avatar answered Oct 05 '22 11:10

Ayman Salama