Installation of R/dsBase package via OPAL admin GUI failed

Hi,

I tried to install R/dsBase package via OPAL/admin but got this error:

POST /service/r/cluster/default/packages?name=dsBase&manager=cran : Gateway Time-out (504):

504 Gateway Time-out

nginx/1.18.0

Installation via R script gives similar error:

dsadmin.install_package(o, ‘dsBase’) Error: [Server error: (504) Gateway Timeout]

How do I fix this?

Kr, Shiny

1 Like

Hi,

See the logs of the R server, it is the one that makes time to respond. Installing R packages is always a pain. This is why it is recommended to use a Docker image for the R server, in order to have a ready-to-use and reproducible R environment.

See documentation: How to Set up DataSHIELD Server Profiles — Opal documentation

Regards
Yannick

Thanks, is there a ready to use R server image? I used the default DataShield docker image (cf Opal doc), which does not contain the dsBase package. Kr, Shiny

Yes, use datashield/rock-base as stated here:

https://opaldoc.obiba.org/en/latest/cookbook/r-datashield/r-profiles.html#step-1-prepare-docker-images

Hi,

I am running now the datashield/rock-base image in parallel to the obiba/rock:latest image. How do i tell OPAL to use the datashield/rock-base process. How do I discover the process in the OPAL / Application interface?

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b9f80b2c4300 datashield/rock-base “/docker-entrypoint.…” 4 minutes ago Up 4 minutes 8085/tcp magical_kalam
f97152cfc0f0 obiba/opal:latest “/bin/bash /docker-e…” 26 hours ago Up 26 hours 0.0.0.0:8880->8080/tcp, :::8880->8080/tcp, 0.0.0.0:8843->8443/tcp, :::8843->8443/tcp docker_opal_1
8a86431ac6d8 obiba/rock:latest “/docker-entrypoint.…” 26 hours ago Up 26 hours 8085/tcp docker_rock_1
56c5b78ba0c0 mongo:4.2 “docker-entrypoint.s…” 26 hours ago Up 26 hours 27017/tcp docker_mongo_1
4ce40b730886 mysql:5 “docker-entrypoint.s…” 26 hours ago Up 26 hours 3306/tcp, 33060/tcp docker_mysqldata_1

Kr, Shiny

Hi,

It is explained here:

https://opaldoc.obiba.org/en/latest/cookbook/r-datashield/r-profiles.html#step-3-discover-rock-r-servers-in-opal

Regards
Yannick

Dear Yannick, thanks, seen that! However, what URL do I have to use for the new Rock server? Currently, http://rock:8085 is registered. Which new URL do I have to fill in in the OPAL/Administration/Apps/Discovery section, so the new Rock server (datashield/rock-base, see output above) is discovered?

Kr, Shiny

It depends on your docker compose settings. In the docker’s local network, the service called rock is accessed via http://rock:8085 then similarly if there is a new R server container running in the same space and you have called it datashield (for instance), then you’ll add http://datashield:8085

Also you have declared 2 different R server profiles, with one that is not for Datashield usage: there is no reason for doing that and it is a potential source of confusion. Just declare that the “rock” service is based on the “datashield/rock-base:latest” image.

Yannick