I have Rstudio server installed on CentOS 6, but I cannot login to Rstudio from the browser at http://localhost:8787 in browser. A popup titled \"RStudio Initialization Erro
I encountered a similar issue while installing Rstudio server on Ubuntu. After following the instructions, I found that I needed to create a home directory folder for each user logging into the Rstudio browser session.
12414 mkdir("/home/chamal", 0777) = -1 EACCES (Permission denied)
12414 sendto(3, "<11>Jun 24 08:43:48 rsession-cha"..., 375, MSG_NOSIGNAL, NULL, 0) = 375
12414 exit_group(1)
When you login the rserver process handles your authentication, and then fires up an rsession process, which is the session you will use. The problem occurs when the rsession process terminates due to an error.
If you have administrator privileges, you can debug the error by tracing the rserver process and looking at the problem that caused rsession to exit.
Here is how to do it.
First find the rserver process-id.
ps auxw | grep studio
rstudio-server 7035 0.0 0.0 362488 4480 ? Ssl 16:37 0:01 /usr/local/lib/rstudio-server/bin/rserver
Note the second number that appears on the output of a row containing the string rstudio-server/bin/rserver. In the case above the process-id is 7035.
Then trace rserver sending the output to a file. The number after -p should be the rserver process-id. The funky -e option is used to cut-down noise from Java's thread management.
sudo strace -f -e 'trace=!clock_gettime,gettimeofday,futex,timerfd_settime,epoll_wait,epoll_ctl' -p 7035 -o trace.txt
Login and wait for the error message to appear.
Stop the tracing by pressing ctrl-c.
Open the file with your favourite editor, and search for the string exit_group.
The lines above it are likely to indicate the error in rsession. In my case it was a symbolic link from .rstudio to a missing directory.
7529 mkdir("/home/dds/.rstudio", 0777) = -1 EEXIST (File exists)
7529 stat("/home/dds/.rstudio", 0x7ffff37419b0) = -1 ENOENT (No such file or directory)
7529 write(2, "07 Feb 2015 16:46:53 [rsession-d"..., 395) = 395
7529 sendto(3, "<11>Feb 7 16:46:53 rsession-dds"..., 398, MSG_NOSIGNAL, NULL, 0) = 398
7529 exit_group(1)
A popup titled "RStudio Initialization Error" appears with message "Unable to connect to service". To fix it, I tried appending the following to /etc/profile so that Revolution R is picked up by RStudio Server Pro sessions for every user:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/RRO/RRO-8.0.3/R-3.1.3/lib64/R/lib:/usr/local/lib64.