RStudio Server Installation/Access Problems under Ubuntu 18.04

Hello,

I'm having trouble getting a new installation of RStudio Server up and running.

System information:
rstudio-server 1.2.1335

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.1

Error information:
The installation seems to have been problem-free. However, when I run

$ sudo rstudio-server verify-installation

I get the output

"Server is running and must be stopped before running verify-installation"

which is anomalous because the server is already stopped:

$ sudo rstudio-server status
● rstudio-server.service - RStudio Server
   Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-07-17 19:26:56 EDT; 17min ago
  Process: 1690 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
  Process: 1621 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
 Main PID: 1622 (code=killed, signal=TERM)

Jul 17 19:26:51 ling-sjtobin02 systemd[1]: Starting RStudio Server...
Jul 17 19:26:51 ling-sjtobin02 systemd[1]: Started RStudio Server.
Jul 17 19:26:56 ling-sjtobin02 systemd[1]: Stopping RStudio Server...
Jul 17 19:26:56 ling-sjtobin02 systemd[1]: Stopped RStudio Server.

Additionally, I'm not able to access the server remotely when I enter the IPaddress:port into Firefox on a 2017 MacBookPro running Mojave (connection reset / page unavailable), though I can ping the server with no problem.

I don't see anything particularly noticeably anomalous in /var/log/syslog (though I can't say that I'm particularly familiar with what I should see there).

I tried uninstalling and reinstalling rstudio-server as described at the following link, to no avail.


I also followed advice from the following link

to make sure that port 8787 is open to accept external connections, which it appears to be (see below). However, although pinging the server works fine, telnet connections to port 8787 from the MacBookPro are refused.

$ sudo ufw allow 8787 
Skipping adding existing rule
Skipping adding existing rule (v6)

It's not clear to me whether AppArmor is used by default any more, but I don't see an apparmor profile for rstudio in /etc/apparmor.d. The secure cookie key is present and appears to have appropriate permission settings.

Would greatly appreciate advice.

Thanks,
Stephen

Could you tell us more about your setup? are you trying to connect to Rstudio server inside a local network (local ip) or in a remote server (public ip)?

Thanks for your response. I'm trying to connect to rstudio-server on a remote server (public ip). The computer is on my university's network.

To give some broader perspective, I'm setting rstudio-server up because I started having somewhat convoluted problems accessing the desktop version of rstudio remotely via ssh. When I was still able to ssh to the desktop version, I had to use my university's VPN to do that while off-site.

With the rstudio-server setup, I get the connection reset / page unavailable response from my browser whether I am connected to the university network on-site or using the VPN off-site.

I don't think you have a public IP just for that server (not a usual setup), if your server connects through your network's public IP, you have to configure port forwarding to point incoming traffic from 8787 port towards the server's local IP.

If you are using a VPN then most likely you should be using the server's local IP.

Anyways this issue seems more related to your network configuration than it is to rstudio server, maybe you should ask your IT department for help.

It turns out that it is a public IP address but modifying connection access settings from my machine was not sufficient. I met with the university IT staff who were able to change network setting to allow incoming connections via VPN. Thanks for your input.

Is there a way I can close this thread or should I just allow it to close automatically after 21 days?

You can mark a post as the solution for your topic (even your own) and that would be enough.

Here’s how to do it:

1 Like

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