Can't start RStudio Server Ubuntu 18.0.4 (bionic)

Since the bionic update I can't start RStudio Server. I'm running R 3.5 and the latest RStudio Server version, but when trying to connect to the http://:8787 it says it can't find the server.

If I launch the terminal and type $ sudo rstudio-server verify-installation, nothing happens, and
$ sudo rstudio-server start
$ sudo rstudio-server restart
I get:
rsession: no process found

I've tried to reinstall it but without success. Any ideas?

Hi, rsession: no process found is just saying that there are no R session currently running, so it doesn't necessarily mean that your RStudio server is not running. Can you try: sudo rstudio-server status?

@edgararuiz thank you for your reply.
The status shows something contradictory to sudo rstudio-server restart.
So to answer your question, it gives the following:

● rstudio-server.service - RStudio Server
   Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-07-31 15:48:56 CEST; 2min 49s ago
  Process: 5914 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
  Process: 5916 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
 Main PID: 5917 (rserver)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/rstudio-server.service
           └─5917 /usr/lib/rstudio-server/bin/rserver

Jul 31 15:48:56 filipe-desktop systemd[1]: Starting RStudio Server...
Jul 31 15:48:56 filipe-desktop systemd[1]: Started RStudio Server.

Which clearly isn't true as the restart or stop command shows no process found. So I assume that this is some sort of a bug or so with the new Ubuntu version.

Ok, I'd venture a guess that this may be a port issue. Either the server or your network firewall is blocking port 8787.

Also not possible as it's a standalone computer and I can't even access when checking it locally. Also nothing changed and the firewall is off. Nevertheless I've added the rule just in case to have that port open and checked if it was listening on that port which it is.

Everything was fine before the update to Ubuntu 18.04. After the update this started to happen.

Does http://localhost:8787/ work?

Try sudo netstat -tulpn -- is the server listening on port 8787?

@jonathan thank you for the suggestion.

It works with localhost. However, if I type the ip address of the machine but locally it doesn't work. Only using the localhost path which is strange because it always worked before with the ip.

This is what I get:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0   *               LISTEN      1211/smbd           
tcp        0      0*               LISTEN      792/rserver         
tcp        0      0 *               LISTEN      671/systemd-resolve 
tcp        0      0    *               LISTEN      850/sshd            
tcp        0      0 *               LISTEN      688/cupsd           
tcp        0      0   *               LISTEN      1211/smbd           
tcp6       0      0 :::139                  :::*                    LISTEN      1211/smbd           
tcp6       0      0 :::22                   :::*                    LISTEN      850/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      688/cupsd           
tcp6       0      0 :::445                  :::*                    LISTEN      1211/smbd           
udp        0      0 *                           726/avahi-daemon: r 
udp    25344      0 *                           671/systemd-resolve 
udp        0      0    *                           916/dhclient        
udp    39936      0*                           989/nmbd            
udp     1536      0*                           989/nmbd            
udp    39936      0   *                           989/nmbd            
udp    26496      0*                           989/nmbd            
udp        0      0*                           989/nmbd            
udp    30080      0   *                           989/nmbd            
udp    23936      0   *                           767/cups-browsed    
udp    43840      0  *                           726/avahi-daemon: r 
udp6       0      0 :::40433                :::*                                726/avahi-daemon: r 
udp6   29184      0 :::5353                 :::*                                726/avahi-daemon: r  

The strange part here is that the firewall is disabled, and on the local machine it suddenly started working when using the localhost path. However, if I try to access it from a remote machine it doesn't work. But supposedly it is listening, so I'm not sure what could be the problem here.
I've contacted the network guys and they changed nothing in the network.

Oddly enough this worked well.

sudo rm -rf /var/lib/rstudio-server
sudo rm -rf /etc/rstudio

After I've reinstalled everything and suddenly everything works. I had tried to reinstall rstudio server before without removing the /etc/rstudio folder, which could have been the conflicting one.
Now I can access everything and connect from a remote machine. However, I'm still not sure what caused this.

1 Like