I have configured RStudio Server 1.0.153 on CentOS. R version 3.4.1 is already installed. However, I am not able to access RStudio Server via Chrome browser.
What I tried:
rstudio-server verify-installation doesn't through any error or any message and successfully comes back to shell after verifying whatever it has to.
rstudio-server status shows following log for active session:
rstudio-server status
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2017-10-21 15:09:21 MST; 2min 26s ago
Process: 159696 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
Process: 159785 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 159787 (rserver)
CGroup: /system.slice/rstudio-server.service
└─159787 /usr/lib/rstudio-server/bin/rserver
Oct 21 15:09:21 localhost.localdomain systemd[1]: Starting RStudio Server...
Oct 21 15:09:21 localhost.localdomain systemd[1]: Started RStudio Server.
For some reason, after above command when I run rstudio-server restart, I get following output:
rsession: no process found
I ran following command to verify install further, however still no output or log generated on system:
On browser, I type: IP:8787, but I get page can't be reached error.
I am using VPN to access RStudio Server, is that not possible? Ideally, it should be possible, given RStudio Server will be used mostly in enterprise using VPN. Any specific firewall settings I need to do?
Hi @chetanpatil, other than port 8787 to be open, there are no other network/port requirements for RStudio Server. As long as rstudio-server status comes back with Active: active(running) then you should be able to access the server via a browser.
~$ R
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> print("I Work")
[1] "I Work"
That response is just because wget isn't a supported "browser". It does indicate that RStudio Server is running and responding to that port, however.
If you are familiar with ssh tunneling, you may want to try forwarding the server 8787 port to your local PC and see if you can access the server that way. If that works, it is either a firewall/server networking issue, or something in your work network (a proxy server or some kind of IP filtering between you and the server).
Edit: Just saw your edit; that sounds like a firewall issue somehow, given that previous troubleshooting showed that the server was listening to all IPs (0.0.0.0).
Yeah, I saw that firewall information, but I don't know enough about firewalld to know about other potential problems. Can you temporarily disable the firewall completely and see if that works?
Ever after disabling firewalld, ufw and SELinux (by default was not enabled), I still get encounter above issue. I can access Apache welcome page if I type the server IP in browser. Only the port is not resolving correctly.
Is it possible to check whether the http://server-ip:8787/ is resolving to correct file on the server? May be only localhost is resolving and not the IP with ports other than 80?
The problem might not be the server at all but the VPN on the client (the machine running the web browser), which might not be configured to route traffic on arbitrary ports. I'd start by looking at that VPN's configuration.
Why are you running Apache on the RStudio Server? Here are a couple more ideas to try:
If you can, bind RStudio Server to port 80 instead of 8787, to see if you can get traffic through on that port.
VPN was not an issue as I am logged without it and using the same network where the server is.
Finally, I solved it and I am not sure which of the following steps helped:
Uninstalled apache from system. I has installed it today just to check if web server is accessible or not.
Edited /etc/rstudio/rserver.conf as:
www-port=8787
www-address=<server-ip>
Executed sudo rstudio-server restart
RStudio Server accessible via browser
To test further, removed server IP from /etc/rstudio/rserver.conf and rebooted the system. RStudio Server is still accessible with following system settings:
public (active)
target: default
icmp-block-inversion: no
interfaces: enp4s0f1
sources:
services: dhcpv6-client ssh
ports: 8787/tcp 8787/udp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
I don't know whether apache was the reason, but I had configured apache today itself. Also, I am not on VPN, but I think it should work out when I am on it. Will give it a try and update here.
I'm so glad is working for you now! Please let us know if you ever figure out what it was, so you're experience can help others that may find themselves in the same situation as you.