can*_*his 9 r rstudio rstudio-server
我在一台aws机器上安装了一个新版本的R(由于某种原因,它总是带有旧版本,而且几乎不可能只有 yum或apt-get工作).我希望rstudio指向这个我从源代码构建的新版本,而不会抛弃旧版本.因此,我转到/etc/rstudio/rserver.conf(文档)并将内容更改为:
# Server Configuration File
rsession-which-r=/root/R-3.2.1/bin/R
Run Code Online (Sandbox Code Playgroud)
我可以确认在这个位置安装了新版本的R,但是在rstudio-server重启后我得到了一个错误.
root@ip-172-31-40-49 rstudio]$ rstudio-server restart
initctl: Unknown instance:
Run Code Online (Sandbox Code Playgroud)
我是什么做的?
首先要做的是检查您的配置:
rstudio-server verify-installation
Run Code Online (Sandbox Code Playgroud)
多次更新R或RStudio时遇到了与您相同的错误并收到以下错误消息.
-bash-4.1$ sudo rstudio-server verify-installation
29 Sep 2015 18:24:11 [rserver] ERROR system error 98 (Address already in use); OCCURRED AT: rstudio::core::Error rstudio::core::http::initTcpIpAcceptor(rstudio::core::http::SocketAcceptorService<boost::asio::ip::tcp>&, const std::string&, const std::string&) /root/rstudio/src/cpp/core/include/core/http/TcpIpSocketUtils.hpp:103; LOGGED FROM: int main(int, char* const*) /root/rstudio/src/cpp/server/ServerMain.cpp:436
rstudio-server start/running, process 48632
Run Code Online (Sandbox Code Playgroud)
虽然我从来没有弄清楚原因,但我可以建议以下解决方法:
1. change the port /etc/rstudio/rserver.conf for example from 8787 to 8788
2. open the new ports in your firewall settings. (allow access to the new port in /etc/sysconfig/iptables)
3. update your firewall: sudo /sbin/service iptables restart
4. restart Rstudio server: sudo rstudio-server restart
Run Code Online (Sandbox Code Playgroud)
这对我来说每次发生的事情都是4-5次.虽然我不是100%肯定这可以帮助您的用例,但它可能.作为替代方案,如果您可以在AWS设置中使用容器,您可能会对使用最新R/Rstudio的现成docker图像感兴趣.