Shiny Proxy Loads White Screen


#1

I have spent so long working on this and have not come any closer to understanding the issue. My docker container works great, and shiny proxy starts with no errors. However, the page rendered by shiny proxy is just white with the title bar, there is no content. Does anyone know why this could be happening? This is my shinyproxy.log file. I have looked it over endlessly but can’t find the source of the issue.

2018-09-21 12:20:57.894  INFO 14369 --- [main]     ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@67b64c45: startup date [Fri Sep 21 12:20:54 EDT 2018]; root of context hierarchy
2018-09-21 12:20:57.896  INFO 14369 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-09-21 12:20:57.897  INFO 14369 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2018-09-21 12:24:21.394  INFO 14663 --- [main] e.o.c.ContainerProxyApplication          : Starting ContainerProxyApplication v0.5.0 on elysium with PID 14663 (/home/corey/Dropbox/CPCT/shinyproxy/shinyproxy-2.0.4.jar started by corey in /home/corey/Dropbox/CPCT/shinyproxy)
2018-09-21 12:24:21.397  INFO 14663 --- [main] e.o.c.ContainerProxyApplication          : No active profile set, falling back to default profiles: default
2018-09-21 12:24:21.451  INFO 14663 --- [main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6fadae5d: startup date [Fri Sep 21 12:24:21 EDT 2018]; root of context hierarchy
2018-09-21 12:24:22.452  INFO 14663 --- [main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-09-21 12:24:23.156  INFO 14663 --- [main] org.xnio                                 : XNIO version 3.3.8.Final
2018-09-21 12:24:23.174  INFO 14663 --- [main] org.xnio.nio                             : XNIO NIO Implementation Version 3.3.8.Final
2018-09-21 12:24:23.241  WARN 14663 --- [main] io.undertow.websockets.jsr               : UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
2018-09-21 12:24:23.241  WARN 14663 --- [main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2018-09-21 12:24:23.259  INFO 14663 --- [main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
2018-09-21 12:24:23.260  INFO 14663 --- [main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1809 ms
2018-09-21 12:24:23.443  INFO 14663 --- [main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-09-21 12:24:23.444  INFO 14663 --- [main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-09-21 12:24:23.444  INFO 14663 --- [main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-09-21 12:24:23.444  INFO 14663 --- [main] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-09-21 12:24:23.445  INFO 14663 --- [main] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-09-21 12:24:23.445  INFO 14663 --- [main] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-09-21 12:24:23.673  INFO 14663 --- [main] e.o.c.stat.StatCollectorRegistry         : Disabled. Usage statistics will not be processed.
2018-09-21 12:24:23.856  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/css/**'], []
2018-09-21 12:24:23.857  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/img/**'], []
2018-09-21 12:24:23.857  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/js/**'], []
2018-09-21 12:24:23.857  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/assets/**'], []
2018-09-21 12:24:23.857  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/webjars/**'], []
2018-09-21 12:24:23.930  INFO 14663 --- [main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1cbb87f3, org.springframework.security.web.context.SecurityContextPersistenceFilter@b62d79, org.springframework.security.web.header.HeaderWriterFilter@51dcb805, org.springframework.security.web.authentication.logout.LogoutFilter@34f5090e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5ace1ed4, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4e096385, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1a4013, org.springframework.security.web.session.SessionManagementFilter@cad498c, org.springframework.security.web.access.ExceptionTranslationFilter@732c2a62]
2018-09-21 12:24:23.960  WARN 14663 --- [main] org.thymeleaf.templatemode.TemplateMode  : [THYMELEAF][main] Template Mode 'HTML5' is deprecated. Using Template Mode 'HTML' instead.
2018-09-21 12:24:24.309  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6fadae5d: startup date [Fri Sep 21 12:24:21 EDT 2018]; root of context hierarchy
2018-09-21 12:24:24.395  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/app/*],methods=[GET]}" onto public java.lang.String eu.openanalytics.shinyproxy.controllers.AppController.app(org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.396  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/app/*],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.String> eu.openanalytics.shinyproxy.controllers.AppController.startApp(javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.396  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/app_direct/*],methods=[GET]}" onto public java.lang.Object eu.openanalytics.shinyproxy.controllers.AppController.appDirect(org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.397  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto private java.lang.String eu.openanalytics.shinyproxy.controllers.IndexController.index(org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.398  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/issue],methods=[POST]}" onto public java.lang.String eu.openanalytics.shinyproxy.controllers.IssueController.postIssue(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-09-21 12:24:24.398  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/admin]}" onto private java.lang.String eu.openanalytics.shinyproxy.controllers.AdminController.admin(org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.401  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public java.lang.String eu.openanalytics.containerproxy.ui.ErrorController.handleError(org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-09-21 12:24:24.401  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],consumes=[application/json],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> eu.openanalytics.containerproxy.ui.ErrorController.error(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-09-21 12:24:24.403  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxy/{proxyId}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<eu.openanalytics.containerproxy.model.runtime.Proxy> eu.openanalytics.containerproxy.api.ProxyController.getProxy(java.lang.String)
2018-09-21 12:24:24.404  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxyspec/{proxySpecId}],methods=[GET],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<eu.openanalytics.containerproxy.model.spec.ProxySpec> eu.openanalytics.containerproxy.api.ProxyController.getProxySpec(java.lang.String)
2018-09-21 12:24:24.404  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxy/{proxySpecId}],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<eu.openanalytics.containerproxy.model.runtime.Proxy> eu.openanalytics.containerproxy.api.ProxyController.startProxy(java.lang.String,java.util.Set<eu.openanalytics.containerproxy.model.runtime.RuntimeSetting>)
2018-09-21 12:24:24.404  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxy],methods=[POST],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<eu.openanalytics.containerproxy.model.runtime.Proxy> eu.openanalytics.containerproxy.api.ProxyController.startProxy(eu.openanalytics.containerproxy.model.spec.ProxySpec)
2018-09-21 12:24:24.405  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxyspec],methods=[GET],produces=[application/json]}" onto public java.util.List<eu.openanalytics.containerproxy.model.spec.ProxySpec> eu.openanalytics.containerproxy.api.ProxyController.listProxySpecs()
2018-09-21 12:24:24.405  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxy/{proxyId}],methods=[DELETE],produces=[application/json]}" onto public org.springframework.http.ResponseEntity<java.lang.String> eu.openanalytics.containerproxy.api.ProxyController.stopProxy(java.lang.String)
2018-09-21 12:24:24.406  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/api/proxy],methods=[GET],produces=[application/json]}" onto public java.util.List<eu.openanalytics.containerproxy.model.runtime.Proxy> eu.openanalytics.containerproxy.api.ProxyController.listProxies()
2018-09-21 12:24:24.408  INFO 14663 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[GET]}" onto public java.lang.Object eu.openanalytics.containerproxy.ui.LoginController.getLoginPage(java.util.Optional<java.lang.String>,org.springframework.ui.ModelMap,javax.servlet.http.HttpServletRequest)
2018-09-21 12:24:24.452  INFO 14663 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/assets/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-21 12:24:24.452  INFO 14663 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-21 12:24:24.452  INFO 14663 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-21 12:24:24.475  INFO 14663 --- [main] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in baseController.RestErrorHandler
2018-09-21 12:24:24.511  INFO 14663 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-09-21 12:24:24.621  INFO 14663 --- [main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2018-09-21 12:24:24.710  INFO 14663 --- [main] o.s.l.c.support.AbstractContextSource    : Property 'userDn' not set - anonymous context will be used for read-write operations
2018-09-21 12:24:24.851  INFO 14663 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-09-21 12:24:24.852  INFO 14663 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-09-21 12:24:24.858  INFO 14663 --- [main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-09-21 12:24:24.933  INFO 14663 --- [main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 4443 (http) with context path ''
2018-09-21 12:24:24.935  INFO 14663 --- [main] e.o.c.ContainerProxyApplication          : Started ContainerProxyApplication in 4.002 seconds (JVM running for 4.517)
2018-09-21 12:24:32.603  INFO 14663 --- [XNIO-2 task-1] io.undertow.servlet                      : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-09-21 12:24:32.603  INFO 14663 --- [XNIO-2 task-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-09-21 12:24:32.626  INFO 14663 --- [XNIO-2 task-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 22 ms
2018-09-21 12:24:46.335  INFO 14663 --- [Thread-2] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6fadae5d: startup date [Fri Sep 21 12:24:21 EDT 2018]; root of context hierarchy
2018-09-21 12:24:46.340  INFO 14663 --- [Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-09-21 12:24:46.341  INFO 14663 --- [Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2018-09-21 12:24:46.345  INFO 14663 --- [Thread-2] io.undertow.servlet                      : Destroying Spring FrameworkServlet 'dispatcherServlet'

#2

Hi @corey,

Could it be that you did not define access-groups for your app, or that the user that logs on is not a member of any of the access-groups? That would in any case result in an empty landing page.

HTH,
Tobias


#3

Hi @tverbeke ,

I did not configure ldap at all because I don’t want this to be user based. Is shinyproxy not the solution for me if I don’t want there to be a login, or is there a way to disable it?

Thanks,
Corey


#4

Hi @corey,

You can use authentication: none, see https://www.shinyproxy.io/configuration/#no-authentication

ShinyProxy is always the solution for you :wink:

Best,
Tobias


#5

Hi @tverbeke,

I am sorry for the endless questions here, but setting authentication to none does not fix the issue. Perhaps I should be more specific, it loads the title bar but nothing else. Would seeing my configuration file help?

Thanks,
Corey


#6

Hi @corey,

Thanks for the feedback. Seeing the configuration might definitely help.

Best,
Tobias


#7

Hi @tverbeke,
This is my configuration file (the indentation is not this weird in my copy, it just got weird when putting it in the code box, apologies):

proxy:                                                                                                                                   
  title: Causal Inference Engine                                                                                                         
  landing-page: /                                                                                                                        
  heartbeat-rate: 10000                                                                                                                  
  heartbeat-timeout: 60000                                                                                                               
  port: 8080                                                                                                                             
  authentication: none                                                                                                                   
 docker:                                                                                                                                
     url: http://localhost:3838                                                                                                           
  port-range-start: 20000                                                                                                              
  specs:                                                                                                                                 
     id: cie                                                                                                                              
     display-name: Causal Inference Engine                                                                                                
     docker-cmd: ["R", "-e", "shiny::runApp('/root/CIE')"]                                                                                
     docker-image: umbibio/cie                                                                                                            
  logging:                                                                                                                               
  file: shinyproxy-cie.log

#8

Hi @corey

A couple of comments:

  • the docker section is a bit odd; if you follow the getting started guide it would look more like
  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000
  • inside the specs, currently (ShinyProxy 2.x.y ) one should use container-cmd and container-image (instead of docker-cmd and docker-image)

HTH,
Tobias


#9

Hi @tverbeke,

Thanks for your help with this. I implemented the changes, however this did not fix the problem (to be honest, I got from a setup like the one described to this trying to fix it). The only think I can think of is I never set up a key in /home/none (I don’t think I need one and the documentation says that it will be ignored if there is nothing in that directory). Could that be the problem?

Thanks,
Corey


#10

Hi @corey,

Is the application.yml present in the same folder where you launch the ShinyProxy jar file?

Best,
Tobias


#11

Hi @tverbeke,

Yes it is. It is also being successfully re-read on each launch of shiny proxy. I confirmed this by changing the only rendered content, the title.

Thanks,
Corey


#12

Hi @corey,

Can you check that all spacing is correct (2 spaces as indentation) and particularly that no tabs are used?

Best,
Tobias


#13

Hello @tverbeke,

I did make sure of that when I was typing it, and thinking along those lines have tried using the tab to space function on emacs before without luck (the correct number of spaces are used, but just in case). To make doubly sure before responding to this comment, I manually erased all preceding whitespace and replaced it with spaces and this did not fix the issue.

Thanks,
Corey


#14

Hi @corey,

I suspect this is a bug with the authentication: none option. Sorry for that - we’ll look into it.

If I use this application.yml (with authentication: simple) everything works (with our demo Docker image):

proxy:
  title: Open Analytics Shiny Proxy
  landing-page: /
  # authentication: none
  authentication: simple
  admin-groups: scientists
  users:
  - name: jack
    password: password
    groups: scientists
  - name: jeff
    password: password
    groups: mathematicians
  # Docker configuration
  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000
  specs:
  - id: 01_hello
    display-name: Hello Application
    description: Application which demonstrates the basics of a Shiny app
    container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
    container-image: openanalytics/shinyproxy-demo
    access-groups: [scientists, mathematicians]
  - id: 06_tabsets
    container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
    container-image: openanalytics/shinyproxy-demo
    access-groups: scientists

logging:
  file:
    shinyproxy.log

Changing it to authentication: none gives me an empty list of apps too.

Best,
Tobias


#15

@corey:

This configuration works, also with authentication: none:

proxy:
  title: Open Analytics Shiny Proxy
  landing-page: /
  authentication: none
  # Docker configuration
  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000
  specs:
  - id: 01_hello
    display-name: Hello Application
    description: Application which demonstrates the basics of a Shiny app
    container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
    container-image: openanalytics/shinyproxy-demo

  - id: 06_tabsets
    container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
    container-image: openanalytics/shinyproxy-demo

logging:
  file:
    shinyproxy.log

Does it work for you too? The main difference is that the access-groups and admin-groups are no longer specified. To simplify things I would first start specifying the apps from the openanalytics/shinyproxy-demo image and move to your app when things work properly with the demo image.

Best,
Tobias


#16

No. I don’t think so. Folder /home/none does not exist on my system either.

Best,
Tobias


#17

Hi @tverbeke,

I found the problem and I am upset at how simple it was. I forgot to put a dash in front of id. Sorry for troubling you about this.

Thanks,
Corey


#18

Hello @corey,

No worries - thanks for the feedback and have fun with ShinyProxy!

Best,
Tobias