Failed to start container

Hi Team,

I am getting the following error when I deploy my app using docker and shinyproxy

Error
Status code: 500

Message: Failed to start container

Stack Trace:
eu.openanalytics.containerproxy.ContainerProxyException: Failed to start container
at eu.openanalytics.containerproxy.backend.AbstractContainerBackend.startProxy(AbstractContainerBackend.java:113)
at eu.openanalytics.containerproxy.service.ProxyService.startProxy(ProxyService.java:213)
at eu.openanalytics.shinyproxy.controllers.AppController.getOrStart(AppController.java:109)
at eu.openanalytics.shinyproxy.controllers.AppController.startApp(AppController.java:68)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.
.
.

at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.base/java.net.Socket.connect(Socket.java:609)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
… 30 more

I already went thru the troublesshoting options here

https://www.shinyproxy.io/troubleshooting/

and my app works fine when I run it manually the manual deploy command

sudo docker run -p 9996:9996 radioimagen5 R -e 'options("shiny.port"=9996,shiny.host="0.0.0.0");rappExt::run_app()'

this is what I have in my application.yaml:

proxy:
hide-navbar: false
support:
mail-to-address: roberto.romo.r@gmail.com
title: Radioimagen Web App
logo-url:
port: 9996
template-path: ./templates/1col
authentication: none
container-wait-time: 90000
heartbeat-rate: 10000
heartbeat-timeout: 20000
landing-page: /app/radioimagen5/
container-log-path: ./container-logs

users:

  • name: robertoromo
    password: pass
    groups: all

docker:
cert-path: /home/none
url: http://localhost:2375
port-range-start: 20000

specs:

  • id: radioimagen5
    display-name: Radioimagen Web App
    description: Application which demonstrates the basics of a Shiny app
    container-cmd: [“R”, “-e”,“options(‘shiny.port’=9996,shiny.host=‘0.0.0.0’);rappExt::run_app()”]
    container-image: radioimagen5
    port: 9996

logging:
file:
shinyproxy.log

@robertoromor: from my experience, such error message is when shinyproxy is unable to communicate via port 2375 internally.

This blog post by @Luke_Singham helped me a lot. For Ubuntu system, follow his guide to set the docker config in /lib/systemd/system/docker.service.

For RHEL, the config that works for me is setting the ExecStart as follow: ExecStart=/usr/bin/dockerd-current -H unix:// -D -H tcp://127.0.0.1:2375

For other Linux distro, shinyproxy’s guide has the corresponding config string to use.

A key piece I find is specifying the correct path for the docker engine, in my case /usr/bin/dockerd-current.