Google Cloud Compute Engine 上的 Rstudio 服务器不是 运行

Rstudio server not running on Google Cloud Compute Engine

为什么“rstudio-server start”不起作用?

此时,即使在 Whosebug 上我也找不到任何有用的答案。 我从以下博客文章中交叉检查了以下步骤 1-5 是否足以在 Ubuntu 上安装 Rstudio Server: https://www.r-bloggers.com/installing-rstudio-server-on-ubuntu-server/ http://www.joeroe.eu/blog/2015/08/rstudio-server-on-a-google-compute-engine-instance/ https://gist.github.com/rweald/4321052

这是我所做的:

1.创建 Google 云 VM

Google Cloud Compute Engine > 创建 VM 实例(在 Ubuntu 16.04 LTS 上)

2。安装 R

sudo nano /etc/sources.list

输入:

deb http://cran.rstudio.com/bin/linux/ubuntu xenial/

获取 public 密钥 ubuntu:

sudo apt-key adv —keyserver keys.gnupg.net —recv-key 381BA480
sudo apt-get update
sudo apt-get install r-base libapparmor1
sudo apt-get install r-base

3。安装 Rstudio 服务器

sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.0.143-amd64.deb
sudo gdebi rstudio-server-1.0.143-amd64.deb

4。在Google云防火墙

中开启8787端口
gcloud compute firewall-rules create allow-rstudio --allow tcp:8787

Remark: I did verify that the port 8787 is open: gcloud compute firewall-rules list NAME NETWORK SRC_RANGES RULES  SRC_TAGS TARGET_TAGS allow-rstudio  default 0.0.0.0/0  tcp:8787 allow-rstudio

5.验证 Rstudio 服务器

No response: http://:8787 >> browser is hanging

No response: sudo rstudio-server verify-installation >> command executes, no message

No response: sudo rstudio-server restart >> no running process to restart ("rsession: no process found")

No response: sudo rstudio-server start >> command executes, no message

感谢您对 RStudio Server 为什么不是 运行 的任何周到帮助。

创建了一个防火墙规则,但是您没有将它应用到任何虚拟机,所以端口仍然没有打开该 VM,因此,您无法访问您的服务器。

当您创建防火墙规则时,添加一个标签作为 per the docs:

gcloud compute firewall-rules create allow-rstudio-server \
    --allow tcp:8787 \
    --target-tags rstudio-server

然后,add the rstudio-server tag 到虚拟机:

gcloud compute instances add-tags [INSTANCE_NAME] --tags rstudio-server

然后尝试再次访问您服务器上的 UI。


也就是说,您真的应该考虑使用 encrypted SSH tunnel to connect to your GCE VM securely instead, to avoid eavesdropping on your data while it is in transit from your computer to your GCE VM and back, or risk MITM attack,它可以拦截您的密码并接管您的服务器,因为您正在使用纯文本 HTTP 访问您的服务器。