ShinyProxy Error 500: container faild to start

Please help troubleshooting.

Getting an error while running the app in shiny proxy:

Error

Status code: 500

Message: Container failed to start

Stack Trace:
eu.openanalytics.containerproxy.ContainerProxyException: Container failed to start
at eu.openanalytics.containerproxy.service.ProxyService.startProxy(ProxyService.java:283)
at eu.openanalytics.shinyproxy.controllers.AppController.getOrStart(AppController.java:150)

In the terminal it looks like this:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is eu.openanalytics.containerproxy.ContainerProxyException: Container failed to start

Caused by: eu.openanalytics.containerproxy.ContainerProxyException: Container failed to start

Caused by: com.spotify.docker.client.exceptions.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied

Caused by: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied

Caused by: javax.ws.rs.ProcessingException: java.io.IOException: Permission denied

Caused by: java.io.IOException: Permission denied

I have tried troubleshooting using FAQ

  • checked docker status - running
    $ sudo service docker status
    returns

● docker.service
Loaded: loaded (/etc/systemd/system/docker.service; static; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─override.conf
Active: active (running) since Sun 2022-05-01 13:14:43 UTC; 44min ago
TriggeredBy: ● docker.socket
Main PID: 2199 (dockerd)
Tasks: 42 (limit: 154542)
Memory: 137.2M
CGroup: /system.slice/docker.service
└─2199 /usr/bin/dockerd -H unix:// -D -H tcp://127.0.0.1:2375

May 01 13:28:39 server dockerd[2199]: time=“2022-05-01T13:28:39.963329243Z” level=debug msg=“attach: stderr: end”
May 01 13:28:39 server dockerd[2199]: time=“2022-05-01T13:28:39.963331781Z” level=debug msg=“attach: stdout: end”
May 01 13:28:39 server dockerd[2199]: time=“2022-05-01T13:28:39.963486954Z” level=debug msg=“attach done”
May 01 13:28:39 server dockerd[2199]: time=“2022-05-01T13:28:39.964309970Z” level=debug msg="Revoking external connectivity on endpoint optimistic_austin (7492433f470379cb1dee27b6e8456e7a9>
May 01 13:28:39 server dockerd[2199]: time=“2022-05-01T13:28:39.966545243Z” level=debug msg=“DeleteConntrackEntries purged ipv4:0, ipv6:0”
May 01 13:28:40 server dockerd[2199]: time=“2022-05-01T13:28:40.127252409Z” level=debug msg=“Releasing addresses for endpoint optimistic_austin’s interface on network bridge”
May 01 13:28:40 server dockerd[2199]: time=“2022-05-01T13:28:40.127336910Z” level=debug msg=“ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)”
May 01 13:28:40 server dockerd[2199]: time=“2022-05-01T13:28:40.127402525Z” level=debug msg="Released address PoolID:LocalDefault/172.17.0.0/16, Address:172.17.0.2 Sequence:App: ipam/defau>
May 01 13:33:41 server dockerd[2199]: time=“2022-05-01T13:33:41.733534296Z” level=debug msg=“Calling HEAD /_ping”
May 01 13:33:41 server dockerd[2199]: time=“2022-05-01T13:33:41.734723540Z” level=debug msg=“Calling GET /v1.41/images/json”

  • Firewall is disabled
    $ sudo ufw status
    Status: inactive

  • I can run demo apps without issues with shinyProxy

  • I can also run the app locally with
    $ sudo docker run -p 3838:3838 battery-plotter R -e "shiny::runApp('/root/app')"
    (no errors and Listening on http://0.0.0.0:3838 at the end)

Please help

Solved by adding permissions to docker.sock file
$ sudo chmod 666 /var/run/docker.sock