Message: Container did not respond in time

Hello all,
I am encountering an issue with my Shiny app. I have built it the “Docker” way using docker-compose to launch the different containers like shinyproxy.

I believe all containers are working fine and communicating, because when I put a simple ui.R & server.R like this one in the right folder, then the app shows up.To me this means this is probably an R issue, maybe due to some missing package. I have been through the posts with similar issues but I could not find how to get the logs of the R Shiny scripts.

When I do docker logs shinyproxy, it gives me the same logs that appear on the interface. So I wonder where to find the relevant logs.
I installed (all I hope) necessary packages in the Dockerfile of my Shiny container, but still I have the below issue and no idea how to debug it.
Thanks for your help in advance !

Status code: 500

Message: Container did not respond in time

Stack Trace:
eu.openanalytics.containerproxy.ContainerProxyException: Container did not respond in time
at eu.openanalytics.containerproxy.backend.AbstractContainerBackend.startProxy(AbstractContainerBackend.java:118)
at eu.openanalytics.containerproxy.service.ProxyService.startProxy(ProxyService.java:213)
at eu.openanalytics.shinyproxy.controllers.AppController.getOrStart(AppController.java:109)

You can try the advice mentioned in https://www.shinyproxy.io/troubleshooting/ to run the app outside of shinyproxy (with docker run).
To see the R logs, you can turn on ‘container logs’ as described in https://www.shinyproxy.io/configuration/#application-container-logs.

Thanks for your reply Maxim.
I have updated my application.yml which now looks like this:
Capture
I then did docker-compose down and docker-compose build and then docker-compose up -d
But I still don’t see any log file appear anywhere.

I also tried the below command:
sudo docker run -p 3838:3838 openanalytics/shinyproxy-demo R -e 'shiny::runApp('/root/app')'
And got the following output:
error1
I then tried this:
sudo docker run -p 3838:3838 openanalytics/shinyproxy-demo R -e 'shiny::runApp("/root/app")'
And it tells me there is no Shiny App in this folder:
error2

Still could not see any logs appear :confused:

Since you are running shinyproxy inside a container, the (container-)logs also appear inside the container…so you can docker exec into your container and check them, or mount a volume to access them from the host.

Thanks. Sorry I am still quite new to docker, how should I be using the docker exec command?
I found the below docker exec -it <container name> <command> but don’t know what type of command I should write. I have tried docker exec -it shinyproxy ./container-logs and it is clearly wrong.

Also I have tried to mount a volume by adding this into the shinyproxy Dockerfile but did not change anything:
ADD . /folder_for_logs

a command could be /bin/bash, which would open a terminal, and there you can navigate to desired folder (I guess /etc/shinyproxy) and check the log file.

Since you are using docker compose, just look up ‘mounting volumes docker compose’, e.g. see https://docs.docker.com/compose/compose-file/#volume-configuration-reference

The command gives me the following error, am I supposed to have a /bin/bash folder?:

Capture

Hi, I believe that you have to check creating of container. Example you have tried is builtin in Shinyproxy. Try with some other example eg. something simple from https://shiny.rstudio.com/gallery/.
Pay attention on proper creating of Dockerfile, include needed R libraries, and pay attention on application name and path which you have on the bottom of Dockerfile.
Reason why you can not run /bin/bash could be wrong container in FROM field in Dockerfile (https://www.shinyproxy.io/deploying-apps/).

hi all, my issue was that to “build” the image, I was only doing docker-compose build … and not giving any name to the image, so the application.yml file was not picked up. Thanks for your help !