Rstudio server not starting in browser

Viewed 232

I connected a GCP VM to my local machine and installed RStudio per this tutorial: https://towardsdatascience.com/r-studio-server-on-google-cloud-dd69b8bff80b

However, when I try to access RStudio server on chrome using http://external-ip:8787 I get a "took too long to respond error.

  1. My installation was successful.
  2. I checked the firewall settings on GCP and it's configured correctly to port 8787.
  3. This is the current status:
● rstudio-server.service - RStudio Server
   Loaded: loaded (/lib/systemd/system/rstudio-server.service; enabled; vendor p
   Active: active (running) since Tue 2021-07-06 21:56:00 UTC; 31min ago
  Process: 8290 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/S
  Process: 8446 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, stat
 Main PID: 8447 (rserver)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/rstudio-server.service
           └─8447 /usr/lib/rstudio-server/bin/rserver

Jul 06 21:56:00 datascience-2 systemd[1]: Starting RStudio Server...
Jul 06 21:56:00 datascience-2 systemd[1]: Started RStudio Server.

Could someone please help me resolve this?

1 Answers

As discussed in the comment, checking the firewall within the instance and allowing the port 8787 will fix the issue, for future readers, here's how to do it in Ubuntu:

sudo ufw allow 8787

Related