Application.yml not being read

Hi there,
I was following the guidance to get the euler demo running and everything seemed to be working, then suddenly shiny proxy stopped reading and executing the application.yml. I know this because it went back to ldap using the demo Tesla/password username and password, despite my having set the authentication to simple in the yml file. Anyone have any idea why it is suddenly not reading the application.yml? I have saved it in the /etc/shinyproxy/ folder and restarted the shinyproxy service. I have also tried starting the jar in /opt/shinyproxy/ and putting the application.yml there. It still seems to bring up the demo ldap with user Tesla. Any ideas? Application.yml below… (I am using an NGINX reverse proxy).

proxy:
  title: Pupilinform
  #logo-url: logo.png
  #favicon-path: favicon.png
  landing-page: /
  heartbeat-rate: 10000
  heartbeat-timeout: 60000
  port: 8080
  authentication: simple
  admin-groups: scientists
  bind-address: 127.0.0.1
  # Example: 'simple' authentication configuration
  users:
  - name: jack
    password: password
    groups: scientists
  - name: jeff
    password: password
    groups: mathematicians
  # Example: 'ldap' authentication configuration
  #ldap:
  #  url: ldap://ldap.forumsys.com:389/dc=example,dc=com
  #  user-dn-pattern: uid={0}
  #  group-search-base:
  #  group-search-filter: (uniqueMember={0})
  #  manager-dn: cn=read-only-admin,dc=example,dc=com
  #  manager-password: password
  
  # 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, mathematicians]
  - id: euler
    display-name: Euler's number
    container-cmd: ["R", "-e", "shiny::runApp('/root/euler')"]
    container-image: openanalytics/shinyproxy-template
    access-groups: [scientists, mathematicians]

logging:
  file:
    shinyproxy.log

Regards,
Will

Looks like there is something wrong with my YAML file, as I have changed it back to the demo one on the ShinyProxy website and now it works. I really don’t know why it is wrong though.

Will

It might not be your case, but for me having the file named application.yaml (notice the extension) instead of application.yml caused the ShinyProxy JAR file not picking it up at all.

It seems the extension is hard-coded to be yml, so just in case this might help other people arriving here from a Google search :slight_smile:

2 Likes

Indeed, Spring is a bit picky about the file extension…

1 Like

Looking back (although it was some time ago now) I think in my case it was just that I wasn’t used to creating YAML files and they don’t seem to work with tab characters (rather than spaces) when indenting.