Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rserver executable not found #538

Closed
frederikziebell opened this issue Sep 12, 2022 · 15 comments · Fixed by #541
Closed

rserver executable not found #538

frederikziebell opened this issue Sep 12, 2022 · 15 comments · Fixed by #541
Assignees
Labels
bug Something isn't working

Comments

@frederikziebell
Copy link

frederikziebell commented Sep 12, 2022

Container image name

rocker/rstudio:4.2.1

Container image digest

No response

What operating system are you seeing the problem on?

Linux

System information

  • singularity version 3.7.0-1.el7
  • linux 3.10.0-1160.11.1.el7.x86_64

Bug description

Running the rserver command inside a singulartiy container gives a FATAL: "rserver": executable file not found in $PATH error.

How to reproduce this bug?

singularity pull docker://rocker/rstudio:4.2

singularity exec rstudio_4.2.sif rserver

Note: The issue does not occurr in rocker/rstudio:4.1.

@frederikziebell frederikziebell added the bug Something isn't working label Sep 12, 2022
@eitsupi
Copy link
Member

eitsupi commented Sep 12, 2022

Sorry for causing this.

I think we can avoid this by specifying absolute paths as like /usr/lib/rstudio-server/bin/rserver for now.

@eitsupi eitsupi self-assigned this Sep 12, 2022
@frederikziebell
Copy link
Author

When connecting to the session, i.e. opening localhost:8787, the server issues an error /etc/rstudio/rsession.sh: 4: exec: rsession: not found. @eitsupi could this be related to the same issue?

@eitsupi
Copy link
Member

eitsupi commented Sep 12, 2022

@frederikziebell Yes, this is because /usr/lib/rstudio-server/bin was removed from the environment variable PATH by #535.
All paths must be absolute except for rstudio-server, where a symbolic link was created by #535.
(It makes sense to use absolute path for rstudio-server as well, to be on the safe side.)

$ find /usr/lib/rstudio-server/bin -maxdepth 1 -perm -111 -type f
/usr/lib/rstudio-server/bin/crashpad_handler
/usr/lib/rstudio-server/bin/rserver-pam
/usr/lib/rstudio-server/bin/pam-helper
/usr/lib/rstudio-server/bin/crash-handler-proxy
/usr/lib/rstudio-server/bin/rpostback
/usr/lib/rstudio-server/bin/crashpad_http_upload
/usr/lib/rstudio-server/bin/rsession
/usr/lib/rstudio-server/bin/r-ldpath
/usr/lib/rstudio-server/bin/rserver
/usr/lib/rstudio-server/bin/rstudio-server

I made the change without knowing that singularity users use these.......

@frederikziebell
Copy link
Author

frederikziebell commented Sep 12, 2022

@eitsupi
Copy link
Member

eitsupi commented Sep 12, 2022

@frederikziebell Are you using this file?
As discussed here (#470 (comment)), this file is not maintained and I was thinking we should remove it.

@frederikziebell
Copy link
Author

I don't know. I just saw that my error was related to rsession.sh and assumed it would be copied to /etc/rstudio/ when the image is created. Do you know how the R session is initiated after logging in to localhost:8787?

@BEFH
Copy link

BEFH commented Sep 12, 2022

Is there any reason we can't just revert #535 and add /usr/lib/rstudio-server/bin/ to PATH again?

@eitsupi
Copy link
Member

eitsupi commented Sep 13, 2022

I don't know. I just saw that my error was related to rsession.sh and assumed it would be copied to /etc/rstudio/ when the image is created. Do you know how the R session is initiated after logging in to localhost:8787?

The file rsession.sh does not exist in rocker/rstudio.
If you are using singularity with the procedure described on the following page, it seems to be defined in the following line
https://github.com/rocker-org/website/blob/cddd1b2f333018739712b3143c46beb3e4f7bc9d/use/singularity.md?plain=1#L90-L95

Is there any reason we can't just revert #535 and add /usr/lib/rstudio-server/bin/ to PATH again?

I do not want to add it to the PATH again for several reasons.

  1. Since this repository divides functionality on a per-script basis, it should rely as little as possible on the PATH environment variable, which is impossible to set just by executing scripts.

    rocker-versioned2/README.md

    Lines 100 to 106 in 37b57ec

    For instance, if one wishes to install Shiny Server on top of a base of `rocker/rstudio:4.0.0`,
    one could write a simple Dockerfile as follows:
    ```Dockerfile
    FROM rocker/rstudio:4.0.0
    RUN /rocker_scripts/install_shiny_server.sh
    ```
  2. RStudio Server works fine without setting PATH.
  3. To reduce the effort of definition file maintenance.

@BEFH
Copy link

BEFH commented Sep 13, 2022 via email

@eitsupi
Copy link
Member

eitsupi commented Sep 13, 2022

What about symlinking rserver, and maybe 1 or 2 other relevant executables into a directory on the default search path?

That's definitely a good idea, but I don't know which executables would be useful to have on the PATH (I don't use any of them).

@cboettig Any thoughts?

@frederikziebell
Copy link
Author

@eitsupi Then it seems symlinking rsession in addition to rserver would solve the singularity issue.

@eitsupi
Copy link
Member

eitsupi commented Sep 13, 2022

Then it seems symlinking rsession in addition to rserver would solve the singularity issue.

I am wondering if rsession is an executable that is intended to be run directly by the users.
If it is only used on scripts, wouldn't it just be enough to use an absolute path?

@frederikziebell
Copy link
Author

Yes that makes sense, thanks!

@BEFH
Copy link

BEFH commented Sep 15, 2022

Personally, I would only use the rserver link, but I've migrated my recipes to use the absolute path. Maybe start with just rserver unless someone does a feature request?

@eitsupi
Copy link
Member

eitsupi commented Sep 15, 2022

Ok, I am still a bit dubious about rserver being on the PATH, but I made the change to add the sym link of rserver in the PR #541 as there seems to be a lot of demand for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants