I am trying to host my shinyproxy applications in AWS’s Amazon Linux 2023. The instance can listen on port 80 only. Hence I have configured application.yml to as follows:
proxy:
title: SMART Tool
container-wait-attempts: 15
hide-navbar: false
logo-url: REDACTED
landing-page: /
heartbeat-rate: 30000
heartbeat-timeout: 120000
port: 80
docker:
url: unix:///var/run/docker.sock
internal-networking: true
network: shinyproxy-net
port-range-start: 20000
skip-image-pull: true
template-groups:
- id: adot
properties:
display-name: Arizona Department of Transportation
specs:
- id: inrixspeedmodule
template-group: adot
display-name: Inrix Speed Module
description: Perform before and after median speed comparisons statewide using INRIX as the data source
container-image: inrixspeedmodule
port: 3838
access-groups: [REDACTED,REDACTED]
I launch shinyproxy using:
sudo java -jar /opt/shinyproxy.jar --spring.config.location=/home/ec2-user/test_smart_tool/shinyproxy/application.yml
The user on an external browser can access the shinyproxy running on AWS through https://shinyanalytics-lb.colo-prod-aws.arizona.edu/
, which displays the list of available applications. Clicking on one of the applications (inrixspeedmodule) from the list, I am redirected to that application’s page. In there, it tries to launch the app but ends up saying "Failed to start app Inrix Speed Module"
(after 55 attempts to start the app) after which it deletes the container from docker as well
In the app.R file of inrixspeedmodule, I have the following loc:
shiny::shinyApp(ui = ui, server = server, options = list(host = "0.0.0.0", port = 3838))
The shinyproxy logs keep saying
2025-03-26 11:30:23.707 WARN 41220 --- [pool-2-thread-1] e.o.shinyproxy.ShinyProxyTestStrategy : [user=kirthanaramesh@arizona.edu proxyId=62f3b924-9b6e-4251-a8f8-af58fd4128f2 specId=inrixspeedmodule] Container unresponsive, trying again (54/55): http://cf4ccd32f24c:3838
2025-03-26 11:30:24.138 WARN 41220 --- [pool-2-thread-1] e.o.containerproxy.service.ProxyService : [user=kirthanaramesh@arizona.edu proxyId=62f3b924-9b6e-4251-a8f8-af58fd4128f2 specId=inrixspeedmodule] Container did not respond in time
[ec2-user@shinyanalytics ~]$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
444abee96cd0 inrixspeedmodule "R -e 'shiny::runApp…" 12 seconds ago Up 11 seconds 3838/tcp admiring_hermann
I checked the docker logs. There the container starts up without any issues and says Listening on http://0.0.0.0:3838
How to make ShinyProxy detect the container as “responsive” when the app runs fine inside Docker?