Container did not respond in time


#1

Hi,

I’m getting container did not respond in time after starting shinyproxy though running manually works. We use packrat for the R packages, wondering if that has anything to do with it.


#2

Hi,

I got the same problem when using packrat. What I would suggest you do is to remove the packrat folder, and in your shiny app’s dockerfile install the required packages. Since now each app will be docker container-wise, that means in your docker container you don’t need packrat because only this app is using R(of course Shiny Server as well).

I used to put all my Shiny apps in a host folder and mount them as volumes in application.yml. And in each Shiny App folder I started packrat by ‘packrat::on()’, it worked for some simple apps, but stopped working when I tried installing more packages. So now I still keep the apps on the host side, but each docker image will need to install per app dependencies in R.

Remember to remove the file .Rprofile because it will contain a line of code which calls packrat’s init script.

Here is an example of a customized docker image I made for my application.

I remember on shinyproxy.io there is a trouble shooting page where you can find some helpful tips as well. Usually if an app can’t start, it’s the app’s R code has issue or the docker image has issue. You will need to look at the shinyproxy log and then check the Shiny Server log in the docker container(I suggest you mount a host volume as the logging place).

Hope it will help.


#3

@Keqiang_Li Have you had any experience with shinyproxy working with images created from AWS ECR?


#4

No I’m using my own server to deploy Shiny apps. But what problem have you encountered?


#5

@Keqiang_Li I originally thought the issue was with AWS ECR and packrat. Now I switched back to the old way of creating docker images but still getting 500 error. The docker build ran successfully.

Here is my dockerfile and application.xml. Any insight would be appreciated.

  • name: macro-model
    display-name: macro-model
    docker-cmd: [“R”, “-e shiny::runApp(’/root/MacroStressModel’)”]
    docker-image: openanalytics/multiple-apps
    groups: “scientist”

===========================================================

FROM openanalytics/r-base

MAINTAINER Tobias Verbeke “tobias.verbeke@openanalytics.eu”

RUN apt-get update && apt-get install -y
sudo
pandoc
pandoc-citeproc
libcurl4-gnutls-dev
libcairo2-dev
libxt-dev
libssl-dev
libssh2-1-dev
libssl1.0.0

RUN apt-get update && apt-get install -y
libmpfr-dev

RUN apt-get update && apt-get install -y
libxml2-dev

RUN apt-get update && apt-get install -y
libcurl4-openssl-dev
RUN apt-get update && apt-get install -y
libv8-dev

RUN R -e “install.packages(c(‘shiny’, ‘shinyjs’, ‘rmarkdown’, ‘XML’, ‘V8’), repos=‘https://cloud.r-project.org/’)”

RUN R -e "install.packages(‘shinydashboard’, repos=‘https://cloud.r-project.org/’)"
RUN R -e "install.packages(c(‘curl’, ‘dplyr’, ‘leaflet’, ‘RCurl’), repos=‘https://cloud.r-project.org/’)"
RUN R -e "install.packages(c(‘shinyjs’, ‘shinythemes’, ‘lattice’, ‘plyr’, ‘sqldf’, ‘DT’, ‘data.table’, ‘dygraphs’, ‘stringr’, ‘htmlwidgets’, ‘d3heatmap’, ‘lazyeval’, ‘xml2’, ‘ggplot2’, ‘forecast’, ‘xts’, ‘zoo’, ‘tibble’, ‘XML’, ‘parallel’, ‘foreach’, ‘doParallel’, ‘plotly’, ‘openxlsx’, ‘futile.logger’), repos=‘https://cloud.r-project.org/’, dependencies=TRUE)"
RUN R -e “install.packages(c(‘boot’,‘leaps’,‘mcmcplots’,‘plotrix’,‘scales’), repos=‘https://cloud.r-project.org/’, dependencies=TRUE)”

RUN mkdir /root/MacroStressModel
COPY macrostressmodel /root/MacroStressModel
RUN ls -la /root/MacroStressModel/

COPY Rprofile.site /usr/lib/R/etc/

EXPOSE 3838

CMD [“R”, “-e shiny::runApp(’/root/MacroStressModel’)”]


#6

With the same dockerfile, but change it to the example app ‘euler’, does it work? Also can you attach some logs?

can you bash into your docker container and check every thing is correct there?


#7

@Keqiang_Li I tried the euler app and it worked fine. Here are some logs

2017-07-19 16:43:27.064 INFO 4611 — [ XNIO-2 task-7] c.s.docker.client.DefaultDockerClient : Starting container with Id: c5fb59b99c472140b0ece90867a2ab52dab0502eb0e4e75a379ce52dc29e0a78
2017-07-19 16:43:29.417 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (2/10): http://127.0.0.1:20000
2017-07-19 16:43:31.419 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (3/10): http://127.0.0.1:20000
2017-07-19 16:43:33.422 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (4/10): http://127.0.0.1:20000
2017-07-19 16:43:35.424 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (5/10): http://127.0.0.1:20000
2017-07-19 16:43:37.426 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (6/10): http://127.0.0.1:20000
2017-07-19 16:43:39.429 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (7/10): http://127.0.0.1:20000
2017-07-19 16:43:41.433 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (8/10): http://127.0.0.1:20000
2017-07-19 16:43:43.435 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (9/10): http://127.0.0.1:20000
2017-07-19 16:43:45.438 WARN 4611 — [ XNIO-2 task-7] eu.openanalytics.services.DockerService : Container unresponsive, trying again (10/10): http://127.0.0.1:20000
2017-07-19 16:43:47.455 ERROR 4611 — [ XNIO-2 task-7] io.undertow.request : UT005023: Exception handling request to /app/macro-model

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is eu.openanalytics.ShinyProxyException: Container did not respond in time
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[javax.servlet-api-3.1.0.jar!/:3.1.0]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar!/:3.1.0]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) ~[spring-security-web-4.2.2.RELEASE.jar!/:4.2.2.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211) [undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) [undertow-core-1.4.11.Final.jar!/:1.4.11.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Caused by: eu.openanalytics.ShinyProxyException: Container did not respond in time
at eu.openanalytics.services.DockerService.startProxy(DockerService.java:272) ~[classes!/:0.8.7]
at eu.openanalytics.services.DockerService.getMapping(DockerService.java:165) ~[classes!/:0.8.7]
at eu.openanalytics.controllers.AppController.app(AppController.java:54) ~[classes!/:0.8.7]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
… 81 common frames omitted


#8

Hi @xiaocalendar,

The unresponsive error means that ShinyProxy was unable to connect to the Shiny app on its exposed HTTP port within the configured timeout (default is 20sec).

You could either increase the timeout (if you suspect that your app needs a longer startup time), using this setting in application.yml (note that the value is in millisec):

shiny:
  proxy:
    container-wait-time: 20000

Also, as @Keqiang_Li suggests, try to bash into your running container, or obtain its stdout /stderr output.
In the upcoming release of ShinyProxy, it will be easier to access these logs.

Regards,
Frederick


#9

Since you said the docker file built successfully, can you try running the container without Shinyproxy?

Say you built the docker image by docker build -rm -t local/multipleapp path/to/Dockerfile

Then docker run -p 3838:3838 -rm -d --name test -v ./shinyLogs/:/var/log/shiny-server/ local/multipleapp (shinyLogs is a folder you can create on your host). If the docker container starts correctly, then use your browser to navigate to your host’s 3838 port to check if the app works. if doesn’t, check the log produced under ./shinyLogs. (You might need to provide sudo to access these log files)


#10

@Keqiang_Li I built the docker image and ran the docker containers you specified. The log is empty and I can’t browse port 3838 from my pc. I could login to the docker container though. I’m not sure what went wrong. Any insights would be very much appreciated.


#11

The thing is in my situation, I was using a shiny server docker image I built myself, where I know how to check the logs at “/var/log/shiny-server/*”. Now that I switched to build the app’s image based on openanalytics/template, I couldn’t figure out a way to see the shiny-server.log as well as the app logs under /var/log/shiny-server/ folder.

@fmichielssen Could you please give instruction on how to check these logs? Is it necessary that we run the app ‘manually’ using ‘docker run’? Thanks.


#12

Note, that openanalytics/shinyproxy-template image does not use shiny server, just the shiny R package. Hence, you won’t find any “shiny-server” logs there.
The general shinyproxy logs can be accessed at the location defined in the logging section of the configuration file (see https://www.shinyproxy.io/configuration/#logging).
Regarding the recently introduced container logs mentioned by @fmichielssen, please see https://www.shinyproxy.io/configuration/#reporting-issues - you would just need to add:

shiny:
  proxy:
    support:
      container-log-path: /path/to/container-logs

to your configuration file.


#13

Thank you @mnazarov,
Your comments are very helpful and thanks a lot.

I tried using the container-log-path property once but failed to get any information. I will give it one more go.


#14

@mnazarov I tried container-log-path but getting empty logs. @Keqiang_Li let me know if you were able to grab any logs.


#15

@xiaocalendar

shiny:
proxy:
support:
container-log-path: ./container-logs

This is my setting, which will create a folder on your host machine at the same level as application.yml and your jar file.


#16

Hey, im trying to setup a Shiny App via Shinyproxy. Im getting this “Container did not respond in time” error. I already tried to solve the issue by setting up the timeout time, but without any suceed. All packages are installed and the demo app is running fine, when i start the container manually.

I guess my “runapp” command to start the app (manually or by my application.yml) is incorrect. In the demo they are using docker-cmd: [“R”, “-e shinyproxy::run_01_hello()”], is it right to write
in my case: [“R”, “-e shinyproxy::run_myapp()”], ?
Could someone provide me the correct syntax to connect my app (which is running fine on the server without an docker image and shinyproxy) with the proxy?

Best regards


#17

OK, that’s the thing. The demo app has a function shinyproxy::run_…(), but your own app doesn’t.

What I do for my app is having no docker cmd configuration in application.yml. Instead, in my app’s Dockerfile, I have this line to run the app: CMD [“R”, “-e”, “shiny::runApp(’/path/to/your/app’)”]

Say if your app is placed in /root/euler/, then it’s CMD [“R”, “-e”, “shiny::runApp(’/root/euler’)”],

Remember you can only have one CMD in the Dockerfile.


#18

Thank you for your fast help. The app is running now :slight_smile: Really great. My last question: My load a .dsv file, which i want to update weekly. i just changed the file on the sftp but the app is still the same. Reboot the server? Do i need to install everything again every week?

And again: Big thanks for your help!


#19

I would place the file on the host where your shinyproxy runs, and mount that file as volume to the docker container. Your app only needs to read the file.

just put this line under your app’s application.yml config docker-volumes: [ “/host/path:/container/path”], where the /host/path has the file. and then you can access the file in your app at /container/path