Container did not respond in time but it works manually


#1

I am getting that 500 error from the title, although when running it manually it works ad I can access the shinyApp.

As I have shiny-server installed on my server aswell I had to change the port from 3838 to 9999.

When starting the app via sudo docker run -it -p 9999:9999 vde/tirol the app starts correctly when going to http://serverIP:9999/ and I see Listening on http://0.0.0.0:9999 in the terminal.

But when I try to start it over shinyproxy via http://serverIP:8080/app_direct/tirol/ I am getting that timeout error.

application.yml:

proxy:
  port: 8080
  authentication: none
  bind-adress: 127.0.0.1
  container-wait-time: 60000
  heartbeat-rate: 10000
  heartbeat-timeout: 200000
  landing-page: /app_direct/tirol/
  hide-navbar: true
  container-backend: docker
  container-log-path: ./container-logs
  docker:
    url: http://localhost:2375
    container-protocol: http
    internal-networking: false
  specs:
  - id: tirol
    display-name: VDE
    container-cmd: ["R", "-e", "shiny::runApp('root/tirol')"]
    container-image: vde/tirol

logging:
  file:
shinyproxy.log

server:
  servlet.session.timeout: 3600

Dockerfile has EXPOSE 9999.

and the Rprofile has shiny.port = 9999

The log files show 30 times:
[XNIO-2 task-6] e.o.shinyproxy.ShinyProxyTestStrategy : Container unresponsive, trying again (17/30): http://localhost:20000

before exiting with this error:
Request processing failed; nested exception is eu.openanalytics.containerproxy.ContainerProxyException: Container did not respond in time


#2

When using the port 3838 it works.

So apparently the other port is blocked and its a firewall configuration.


#3

The 3838 is the default port, if you use a different one (9999), you need to specify it in the specs:

specs:
  - id: tirol
    display-name: VDE
    container-cmd: ["R", "-e", "shiny::runApp('root/tirol')"]
    container-image: vde/tirol
    port: 9999

#4

Ah, interesting, I missed that option. It seems to work now. Thank you!


#5

It is mentioned at the end of “Apps” section, just before https://www.shinyproxy.io/configuration/#logging


#6

Yes I saw it and edited my reply already :wink: Thanks again!