Rstudio server not running - disabling apparmor does not fix it

Hello,
I installed Rstudio server for ubuntu

$ sudo gdebi rstudio-server-1.0.153-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... 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
Selecting previously unselected package rstudio-server.
(Reading database ... 414878 files and directories currently installed.)
Unpacking rstudio-server (from rstudio-server-1.0.153-amd64.deb) ...
Setting up rstudio-server (1.0.153) ...
useradd: user 'rstudio-server' already exists
groupadd: group 'rstudio-server' already exists
rsession: no process found
rstudio-server stop/waiting
rstudio-server start/running, process 48203

Verified the installation

$ sudo rstudio-server verify-installation
rstudio-server stop/waiting
14 Dec 2018 15:58:37 [rserver] WARNING Unable to change rserver into app armor restricted hat (profile may be disabled); LOGGED FROM: rstudio::core::Error rstudio::server::app_armor::enforceRestricted() /home/ubuntu/rstudio/src/cpp/server/ServerAppArmor.cpp:85
rstudio-server start/running, process 48372

Disabled app_armor and restart

$ ls /etc/apparmor.d/rstudio-server
/etc/apparmor.d/rstudio-server
$ sudo ln -s /etc/apparmor.d/rstudio-server /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/rstudio-server
$ sudo rstudio-server restart
rstudio-server start/running, process 48285
rsession: no process found

But after checking, it still promts the same message

$ sudo rstudio-server verify-installation
rstudio-server stop/waiting
14 Dec 2018 16:02:34 [rserver] WARNING Unable to change rserver into app armor restricted hat (profile may be disabled); LOGGED FROM: rstudio::core::Error rstudio::server::app_armor::enforceRestricted() /home/ubuntu/rstudio/src/cpp/server/ServerAppArmor.cpp:85
rstudio-server start/running, process 48374

Any ideas what other problem(s) might be causing this?

The current release is RStudio v1.1.463; do you have any better luck with that release?

Hello,
Yes, sorry forgot to mention it. I started with that version and could not even deactivate apparmor correctly. I get the following error

$ sudo apparmor_parser -R /etc/apparmor.d/rstudio-server
AppArmor parser error for /etc/apparmor.d/rstudio-server in /etc/apparmor.d/rstudio-server at line 45: syntax error, unexpected TOK_OPENPAREN, expecting TOK_MODE

You might also try the preview release -- IIRC we no longer use AppArmor in v1.2.

That said, this line:

AppArmor parser error for /etc/apparmor.d/rstudio-server in /etc/apparmor.d/rstudio-server at line 45: syntax error, unexpected TOK_OPENPAREN, expecting TOK_MODE

suggests that there is a syntax error in your AppArmor definition at /etc/apparmor.d/rstudio-server.

Thanks again Kevin,

That worked! But now I cannot connect to the server in my browser. Everything seems fine though:

$ rstudio-server version
1.2.1206
$ sudo rstudio-server verify-installation
rstudio-server stop/waiting
rstudio-server start/running, process 55975

and the port is listening

$ sudo netstat -anp | grep 8787
tcp        0      0 0.0.0.0:8787            0.0.0.0:*               LISTEN      53609/rserver

It must be some problem with the firewall that I'm unaware. I will contact the server admin. Unless you have any pointers?

cheers

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