Bug 1921907 - rstudio-server 1.4.1103 fails to start
Summary: rstudio-server 1.4.1103 fails to start
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rstudio
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Iñaki Ucar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-28 20:10 UTC by Deb Mukherjee
Modified: 2021-01-29 17:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-29 17:18:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Deb Mukherjee 2021-01-28 20:10:44 UTC
Description of problem:

Downloaded the available rstudio-server package details below:-

```

# dnf info rstudio-server
Installed Packages
Name         : rstudio-server
Version      : 1.4.1103
Release      : 1.fc33
Architecture : x86_64
Size         : 1.1 M
Source       : rstudio-1.4.1103-1.fc33.src.rpm
Repository   : updates
Summary      : Access RStudio via a web browser
URL          : https://github.com/rstudio/rstudio
License      : AGPLv3 and LGPLv2+ and ASL 2.0 and MIT and BSD and ISC and W3C and MPLv1.1 and CPL and CC-BY and Public Domain
Description  : RStudio is an integrated development environment (IDE) for R. It includes a
             : console, syntax-highlighting editor that supports direct code execution, as
             : well as tools for plotting, history, debugging and workspace management.
             :
             : This package provides the Server version, a browser-based interface to the RStudio IDE.

```


$ uname a
Linux xxx 5.10.10-200.fc33.x86_64 #1 SMP Sun Jan 24 19:58:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ rstudio-server version
1.4.1103 (Wax Begonia) for Fedora release 33 (Thirty Three)

# rstudio-server verify-installation
# <- # returns comand prompt without error

# rstudio-server start
Job for rstudio-server.service failed because the control process exited with error code.
See "systemctl status rstudio-server.service" and "journalctl -xe" for details.

# rstudio-server status
● rstudio-server.service - RStudio Server
     Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
     Active: "failed" (Result: exit-code) since Thu 2021-01-28 12:12:50 EST; 4min 53s ago
    Process: 3269 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=203/EXEC)
        CPU: 1ms

Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Scheduled restart job, restart counter is at 5.
Jan 28 12:12:50 xxx systemd[1]: Stopped RStudio Server.
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Start request repeated too quickly.
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Failed with result 'exit-code'.
Jan 28 12:12:50 xxx systemd[1]: Failed to start RStudio Server.

# journalctl -xe|grep rstudio|tail -20
░░ Subject: Process /usr/lib/rstudio-server/bin/rserver could not be executed
░░ The process /usr/lib/rstudio-server/bin/rserver could not be executed and failed.
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Control process exited, code=exited, status=203/EXEC
░░ An ExecStart= process belonging to unit rstudio-server.service has exited.
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Failed with result 'exit-code'.
░░ The unit rstudio-server.service has entered the 'failed' state with result 'exit-code'.
░░ Subject: A start job for unit rstudio-server.service has failed
░░ A start job for unit rstudio-server.service has finished with a failure.
Jan 28 12:12:50 xxx audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=rstudio-server comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Scheduled restart job, restart counter is at 5.
░░ Automatic restarting of the unit rstudio-server.service has been scheduled, as the result for
░░ Subject: A stop job for unit rstudio-server.service has finished
░░ A stop job for unit rstudio-server.service has finished.
Jan 28 12:12:50 xxx audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=rstudio-server comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 28 12:12:50 xxx audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=rstudio-server comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Start request repeated too quickly.
Jan 28 12:12:50 xxx systemd[1]: rstudio-server.service: Failed with result 'exit-code'.
░░ The unit rstudio-server.service has entered the 'failed' state with result 'exit-code'.
░░ Subject: A start job for unit rstudio-server.service has failed
░░ A start job for unit rstudio-server.service has finished with a failure.

# ps -aux |grep rserver
root        3273  0.0  0.0 221432   832 pts/0    S+   12:13   0:00 grep --color=auto rserver

# cat /etc/rstudio/rserver.conf
# Server Configuration File
# <- # returns command prompt no config set

# cat /etc/rstudio/rsession.conf
# R Session Configuration File
r-libs-user=~/R/library
#

# ls /var/log/rstudio-server/
# <- no files here


How reproducible:
Always

Steps to Reproduce:
1. Issue systemctl start restudio-server


Actual results:
Job for rstudio-server.service failed because the control process exited with error code.
See "systemctl status rstudio-server.service" and "journalctl -xe" for details.


Expected results:
The server should start without any error.

Additional info:

Work around: 

Download rstudio-server from:- 
https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-1.4.1103-x86_64.rpm

and install this package using dnf localinstall.

Comment 1 Iñaki Ucar 2021-01-28 20:34:53 UTC
Packages provided by RStudio cannot be mixed with the ones distributed in Fedora. You should remove everything and reinstall:

$ sudo dnf remove rstudio*
$ sudo dnf install rstudio-server

Comment 2 Deb Mukherjee 2021-01-29 00:43:24 UTC
I never mixed RStudio and F33 packages.

The problem happened when there was no RStudio
packages in the system, and I installed rstudio-server
the way you have mentioned.

When I failed to get the fc33 rstudio-server up and running.
I removed the fc33 rstudio-server, and installed the 
Rstudio.org's rstudio-server. This is a work around after 
encountering the bug. Faced the bug when the system was
free of any Rstudio.org packages.

Comment 3 Iñaki Ucar 2021-01-29 09:47:24 UTC
(In reply to Deb Mukherjee from comment #2)
> I never mixed RStudio and F33 packages.
> 
> The problem happened when there was no RStudio
> packages in the system, and I installed rstudio-server
> the way you have mentioned.

That is not possible for a simple reason:

(In reply to Deb Mukherjee from comment #0)
> # rstudio-server status
> ● rstudio-server.service - RStudio Server
>      Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
>      Active: "failed" (Result: exit-code) since Thu 2021-01-28 12:12:50 EST; 4min 53s ago
>     Process: 3269 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=203/EXEC)
>         CPU: 1ms

Our packages do not install any binary under /usr/lib, and do not install the systemd unit file under /etc. You must have had artifacts from an old RStudio installation in your system. If you clean them up, it will work just fine.

Comment 4 Deb Mukherjee 2021-01-29 13:04:13 UTC
Alright, I issued 
# dnf remove rstudio*

[OUTPUT OMITTED]

Then issued 
[root@xxx xxx] # dnf install rstudio-server

OUTPUT

Fedora Modular 33 - x86_64 - Updates                                                                                                                                                                          413  B/s | 8.5 kB     00:21
Fedora Modular 33 - x86_64 - Updates                                                                                                                                                                           80 kB/s |  45 kB     00:00
Fedora 33 - x86_64 - Updates                                                                                                                                                                                  115 kB/s | 9.2 kB     00:00
Fedora 33 - x86_64 - Updates                                                                                                                                                                                  2.4 MB/s | 2.3 MB     00:00
RPM Fusion for Fedora 33 - Free tainted                                                                                                                                                                        36 kB/s | 2.9 kB     00:00
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                      Architecture                                        Version                                                          Repository                                            Size
==============================================================================================================================================================================================================================================
Installing:
 rstudio-server                                               x86_64                                              1.4.1103-1.fc33                                                  updates                                              1.1 M
Installing dependencies:
 libpq                                                        x86_64                                              12.5-1.fc33                                                      updates                                              208 k
 rstudio                                                      x86_64                                              1.4.1103-1.fc33                                                  updates                                               35 M
 soci                                                         x86_64                                              4.0.1.alpha2-5.fc33                                              fedora                                               121 k
 soci-postgresql                                              x86_64                                              4.0.1.alpha2-5.fc33                                              fedora                                                62 k
 soci-sqlite3                                                 x86_64                                              4.0.1.alpha2-5.fc33                                              fedora                                                60 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install  6 Packages

Total download size: 36 M
Installed size: 414 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): libpq-12.5-1.fc33.x86_64.rpm                                                                                                                                                                           2.1 MB/s | 208 kB     00:00
(2/6): rstudio-server-1.4.1103-1.fc33.x86_64.rpm                                                                                                                                                              6.3 MB/s | 1.1 MB     00:00
(3/6): soci-4.0.1.alpha2-5.fc33.x86_64.rpm                                                                                                                                                                    453 kB/s | 121 kB     00:00
(4/6): soci-postgresql-4.0.1.alpha2-5.fc33.x86_64.rpm                                                                                                                                                         291 kB/s |  62 kB     00:00
(5/6): soci-sqlite3-4.0.1.alpha2-5.fc33.x86_64.rpm                                                                                                                                                            918 kB/s |  60 kB     00:00
(6/6): rstudio-1.4.1103-1.fc33.x86_64.rpm                                                                                                                                                                      38 MB/s |  35 MB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                          34 MB/s |  36 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                      1/1
  Installing       : soci-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                                      1/6
  Installing       : soci-sqlite3-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                              2/6
  Installing       : libpq-12.5-1.fc33.x86_64                                                                                                                                                                                             3/6
  Installing       : soci-postgresql-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                           4/6
  Installing       : rstudio-1.4.1103-1.fc33.x86_64                                                                                                                                                                                       5/6
  Running scriptlet: rstudio-server-1.4.1103-1.fc33.x86_64                                                                                                                                                                                6/6
  Installing       : rstudio-server-1.4.1103-1.fc33.x86_64                                                                                                                                                                                6/6
  Running scriptlet: rstudio-server-1.4.1103-1.fc33.x86_64                                                                                                                                                                                6/6
  Verifying        : libpq-12.5-1.fc33.x86_64                                                                                                                                                                                             1/6
  Verifying        : rstudio-1.4.1103-1.fc33.x86_64                                                                                                                                                                                       2/6
  Verifying        : rstudio-server-1.4.1103-1.fc33.x86_64                                                                                                                                                                                3/6
  Verifying        : soci-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                                      4/6
  Verifying        : soci-postgresql-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                           5/6
  Verifying        : soci-sqlite3-4.0.1.alpha2-5.fc33.x86_64                                                                                                                                                                              6/6

Installed:
  libpq-12.5-1.fc33.x86_64     rstudio-1.4.1103-1.fc33.x86_64     rstudio-server-1.4.1103-1.fc33.x86_64     soci-4.0.1.alpha2-5.fc33.x86_64     soci-postgresql-4.0.1.alpha2-5.fc33.x86_64     soci-sqlite3-4.0.1.alpha2-5.fc33.x86_64

Complete!

ENABLE in SYSTEMD (looks like it does write in /etc/systemd)

[root@xxx xxx] # systemctl enable rstudio-server.service
Created symlink /etc/systemd/system/multi-user.target.wants/rstudio-server.service → /etc/systemd/system/rstudio-server.service.

START THE SERVICE

[root@xxx xxx] # systemctl start rstudio-server.service
Job for rstudio-server.service failed because the control process exited with error code.
See "systemctl status rstudio-server.service" and "journalctl -xe" for details.

CHECK THE STATUS (same as before)

[root@xxx xxx] # systemctl status rstudio-server
● rstudio-server.service - RStudio Server
     Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2021-01-29 07:42:08 EST; 49s ago
    Process: 2637 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=203/EXEC)
        CPU: 2ms

Jan 29 07:42:08 xxx.xxx systemd[1]: rstudio-server.service: Scheduled restart job, restart counter is at 5.
Jan 29 07:42:08 xxx.xxx systemd[1]: Stopped RStudio Server.
Jan 29 07:42:08 xxx.xxx systemd[1]: rstudio-server.service: Start request repeated too quickly.
Jan 29 07:42:08 xxx.xxx systemd[1]: rstudio-server.service: Failed with result 'exit-code'.
Jan 29 07:42:08 xxx.xxx systemd[1]: Failed to start RStudio Server.


TRY TO MANUALLY REMOVE THE OFFENDING FILES

[root@xxx xxx] # mv /etc/systemd/system/rstudio-server.service /etc/systemd/system/rstudio-server.service.bak

[root@xxx xxx] # mv /usr/lib/rstudio-server /usr/lib/rstudio-server.bak
mv: cannot stat '/usr/lib/rstudio-server': No such file or directory

Comment 5 Iñaki Ucar 2021-01-29 13:20:35 UTC
I insist, this:

>      Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)

is not a file installed by any Fedora package. You must clean up that (and reload systemd) before attempting to enable and start the service.

Comment 6 Deb Mukherjee 2021-01-29 16:40:24 UTC
OK. Things worked out after manually removing 
/etc/systemd/system/rstudio-server.service file.

```
[root@xxx xxx] # cd /etc/systemd/system/

[root@xxx system] # rm rstudio-server.service
rm: remove regular file 'rstudio-server.service'? y

[root@xxx system] # systemctl start rstudio-server
Warning: The unit file, source configuration file or drop-ins of rstudio-server.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for rstudio-server.service failed because the control process exited with error code.
See "systemctl status rstudio-server.service" and "journalctl -xe" for details.

[root@xxx system] # systemctl daemon-reload

[root@xxx system] # systemctl start rstudio-server

[root@xxx system] # systemctl status rstudio-server
● rstudio-server.service - RStudio Server
     Loaded: loaded (/usr/lib/systemd/system/rstudio-server.service; disabled; vendor preset: disabled)
     Active: active (running) since Fri 2021-01-29 11:20:24 EST; 19s ago
    Process: 4075 ExecStart=/usr/libexec/rstudio/bin/rserver (code=exited, status=0/SUCCESS)
   Main PID: 4076 (rserver)
      Tasks: 3 (limit: 33521)
     Memory: 3.8M
        CPU: 511ms
     CGroup: /system.slice/rstudio-server.service
             └─4076 /usr/libexec/rstudio/bin/rserver

Jan 29 11:20:24 xxx.xxx systemd[1]: Starting RStudio Server...
Jan 29 11:20:24 xxx.xxx systemd[1]: Started RStudio Server.
```

Comment 7 Iñaki Ucar 2021-01-29 17:18:11 UTC
That's it, thanks for confirming it. Those are the correct paths for the service file (/usr/lib/systemd) and the binaries (/usr/libexec/rstudio). For future reference, you can see files owned by the packages using the rpm command. E.g.:

$ rpm -ql rstudio
$ rpm -ql rstudio-server


Note You need to log in before you can comment on or make changes to this bug.