首先要做的是检查您的配置:
rstudio-server verify-installation
在更新 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
虽然我一直无法找出原因,但我可以建议以下解决方法:
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
这对我来说已经发生了约 4-5 次。虽然我不是 100% 确定这对您的用例有帮助,但它可能会。作为替代方案,如果您可以在 AWS 设置中使用容器,您可能会对带有最新 R/Rstudio 的现成 docker 镜像感兴趣。