Closed sergrous closed 8 years ago
I get the same behavior - this can be normal on Ubuntu systems and some specific Rstudio environment variables need to be set:
Please try the following(this worked for me):
1). From a Linux shell prompt, type:
%export RSTUDIO_WHICH_R=/usr/bin/R
2). Make sure that a link '/usr/bin/R' exists in your install and points to the following: /usr//lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/R
3). Make sure that port 8787 is open on your system.
4). Open a web browser and point it to: http://:8787
This should open Rstudio with a login prompt.
5). If you want to permanently set the environment variable, 'RSTUDIO_WHICH_R' add it to your .bash_profile file in your user home directory.
Stephen Weller Revolution R Open Technical Support
This is not normal. I have not seen this till 3.2.2 upgrade. As I have shown above it was working as expected with RRO 3.2.1. You instructions do not make any sense to me. rstudio server is started by a system process with root level privileges. Here is what I get
# export RSTUDIO_WHICH_R=/usr/bin/R
# ls -l /usr/bin/R
lrwxrwxrwx 1 root root 41 Sep 8 13:33 /usr/bin/R -> /usr//lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/R
# rstudio-server version
0.99.484
# rstudio-server status
rstudio-server stop/waiting
# rstudio-server test-config
# rstudio-server verify-installation
20 Sep 2015 05:26:24 [rserver] ERROR R did not return any output when queried for directory location information; LOGGED FROM: bool rstudio::core::r_util::{anonymous}::detectRLocationsUsingR(const string&, rstudio::core::FilePath*, rstudio::core::FilePath*, rstudio::core::config_utils::Variables*, std::string*) /home/ubuntu/rstudio/src/cpp/core/r_util/REnvironmentPosix.cpp:491
20 Sep 2015 05:26:24 [rserver] ERROR Unable to determine R home directory; LOGGED FROM: bool rstudio::core::r_util::{anonymous}::detectRLocationsUsingScript(const rstudio::core::FilePath&, rstudio::core::FilePath*, rstudio::core::FilePath*, rstudio::core::config_utils::Variables*, std::string*) /home/ubuntu/rstudio/src/cpp/core/r_util/REnvironmentPosix.cpp:435
R did not return any output when queried for directory location information; Unable to determine R home directory
rstudio-server start/running, process 9404
# rstudio-server start
rstudio-server start/running, process 9706
# ps -ef | grep -i rstudio
root 10002 7656 0 01:26 pts/1 00:00:00 grep --color=auto -i rstudio
# netstat --tcp -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:6010 *:* LISTEN
tcp 0 0 localhost:6011 *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 localhost:6010 [::]:* LISTEN
tcp6 0 0 localhost:6011 [::]:* LISTEN
tcp6 0 0 [::]:http [::]:* LISTEN
#
As you can see there is not point of me trying to browser connection since no service is listening on 8787. And adding export RSTUDIO_WHICH_R=/usr/bin/R to my .bash_profile makes absolutely no sense since server is started during teh system start up by root, not me. And as you can see - it is no longer starting due to upgrade to 3.2.2.
I am running a cluster of ubuntu 14.04 LTS servers w/ RStudio server 0.99.484 on them for web only access for end users. And it is no longer working.
Btw, if I down grade to 3.2.1 - RStudio server starts just fine and binds to 8787 w/out need to specify RSTUDIO_WHICH_R, except I lose graphics capabilities with 3.2.1
Good observation. We will investigate the issue and see if we can fix this in a future release.
Stephen Weller Revolution R Open Support
FYI, port 8787 is the default port that Rstudio uses for web access, that is why I mentioned it in my previous post.
This might be related to the problem I encountered, in which case the cause is line 4 in /usr/lib64/RRO-3.2.2/R-3.2.2/lib64/R/bin/R
which determines R_HOME_DIR based on readlink /proc/$$/fd/255
. However that command seems to be implementation dependent and does not work reliably across different Linux distributions or shell environments. After I changed line 4 to the absolute path R_HOME_DIR=/usr/lib64/RRO-3.2.2/R-3.2.2/lib64/R
everything works.
In my case it was setting to /usr/lib64/RRO-3.2.2/R-3.2.2/lib/R
, but that did the trick! Thank you so much.
had the same issue on ubuntu 14.04, setting R_HOME_DIR to /usr/lib64/RRO-3.2.2/R-3.2.2/lib/R worked for me, too. Thanks!
@warmdev the editing of line 4 works for me as well. ubuntu 14.04
Thanks @warmdev. It worked for me too.
I cannot believe this. It's still not fixed on MRO-3.2.5. ubuntu 14.04
fix:
sudo nano /usr/lib64/MRO-3.2.5/R-3.2.5/lib/R/bin/R
change the 4th line to
R_HOME_DIR='/usr/lib64/MRO-3.2.5/R-3.2.5/lib/R'
seriously, it's MRO-3.3.0 and same issue...
on ubuntu 14.04
sudo nano /usr/lib64/MRO-3.3.0/R-3.3.0/lib/R/bin/R
change the 4th line to
R_HOME_DIR='/usr/lib64/MRO-3.3.0/R-3.3.0/lib/R'
I'll keep posting until they fix it.
This was fixed in MRO 3.3.1. We've also moved repositories to this new location: https://github.com/Microsoft/microsoft-r-open
It was working fine with 3.2.1 for the exception of missing GraphicsDevice capabilities. I've done purging and complete reinstalls of RStudio server, RRO-3.2.1 and RRO-3.2.2. I was able to successfully reproduce the error below w/ 3.2.2 and recover after purging and reinstalling 3.2.1