Problems loading rstudio server onto digitalocean

Hi community :slight_smile:

I'm testing deployment of a plumber API on digitalocean, and it's my first time doing this so have got stuck several times. I've followed these steps:-

  • Started a droplet with SSH as per DO's instructions (ubuntu 18.04.03 x64)
  • Used plumber to provision it with do_provision(ip) - this appears to have worked (got a Plumber is alive!) message when visiting IP
  • Tried cloning API files directly from github - got them on the server but probably not in the right place and they don't fire up automatically, so thought I should add rstudio server and manage through that.
  • Run wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1578-amd64.deb to download, and sudo gdebi rstudio-server-1.2.1578-amd64.deb to install rstudio.
  • Visit ip.ip.ip.ip:8787 and nothing happens.

Here are the terminal responses on the rstudio install...

james@xxxxxx : ~ $ wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1578-amd64.deb
--2019-09-18 07:46:11-- https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1578-amd64.deb
Resolving download2.rstudio.org (download2.rstudio.org)... 54.192.34.78, 54.192.34.39, 54.192.34.6, ...
Connecting to download2.rstudio.org (download2.rstudio.org)|54.192.34.78|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 38728538 (37M) [application/x-deb]
Saving to: β€˜rstudio-server-1.2.1578-amd64.deb’

Then install...
james@xxxxxx : ~ $ sudo gdebi rstudio-server-1.2.1578-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
RStudio Server
RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.

Do you want to install the software package? [y/N]:y
(Reading database ... 106527 files and directories currently installed.)
Preparing to unpack rstudio-server-1.2.1578-amd64.deb ...
Unpacking rstudio-server (1.2.1578) over (1.2.1578) ...
Setting up rstudio-server (1.2.1578) ...
useradd: user 'rstudio-server' already exists
groupadd: group 'rstudio-server' already exists
Created symlink /etc/systemd/system/multi-user.target.wants/rstudio-server.service β†’ /etc/systemd/system/rstudio-server.service.
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-09-18 07:46:34 UTC; 1s ago
Process: 4532 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 4540 (rserver)
Tasks: 3 (limit: 2361)
CGroup: /system.slice/rstudio-server.service
└─4540 /usr/lib/rstudio-server/bin/rserver

Sep 18 07:46:34 api-test2-sep19 systemd[1]: Starting RStudio Server...
Sep 18 07:46:34 api-test2-sep19 systemd[1]: Started RStudio Server.

Then, no joy at ip.ip.ip.ip:8787

Thanks for any help you can give!
James

UPDATE

I ran sudo ufw allow 8787 after re-starting rstudio via the command line, and this seemed to sort it out.

The various community articles are all useful but I found that each of them left out common-sense steps which are not familiar to someone who doesn't 'do' DevOps. Will try to comment on each where I can :slight_smile:

2 Likes

I discovered it was a whole lot easier to simply use analogsea to deploy and configure the API. i.e. (thanks to Paul Campbell for the fix)

library(analogsea)
library(plumber)

droplets()

mydrop <- do_provision(droplet = 123456789, unstable = FALSE, example = FALSE)

do_deploy_api(mydrop, path = "api_remote_folder", localPath = here::here("api_local_folder/"), port = 8080, swagger = TRUE)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.