Oasis UI - idle session crash
Issue Description
An authentication issue with keycloak causes the UI app to crash after a short period of time ~ 3-4 mins
Steps to Reproduce (Bugs only)
- Login (works)
- Idle for a few mins on any page
- UI app grey out crashes
Version / Environment information
UI 1.11.3 Newer platform build (platform-2.0)
Update: testing by @RolandASc points to a connection problem internal to the cluster. External UI apps connecting via HTTPS don't show this problem.
Follow up is to look at the ingress nginx configuration
https://www.keycloak.org/docs/latest/server_installation/index.html#_setting-up-a-load-balancer-or-proxy
https://kubernetes.github.io/ingress-nginx/
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
Something is wonky with the websocket connection

https://www.civo.com/learn/using-websockets-with-ingress-controller https://stackoverflow.com/questions/52883653/nginx-ingress-controller-websocket-support#52884066
The above happens with firefox after an connection Upgrade request to the websocket:
x.x.x.x - - [15/Sep/2022:08:47:56 +0000] "GET /websocket/ HTTP/1.1" 101 8387 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0" 651 262.311 [default-oasis-ui-8080] [] 10.240.0.21:3838 0 262.312 101 eada5b797fb74856da7abec2d04afc42
10.240.0.30 - - [15/Sep/2022:08:48:01 +0000] "GET /auth/realms/oasis/protocol/openid-connect/userinfo HTTP/1.1" 200 226 "-" "python-requests/2.26.0" 1773 0.007 [default-keycloak-8080] [] 10.240.0.12:8080 226 0.008 200 913bbd6c200667a9dddd7859bac7dc15
Seems similar to, the following and only happens when the Shiny app is behind a proxy server. https://github.com/rstudio/rstudio/issues/2940 https://github.com/rstudio/shiny/issues/2925
hello,
could you think about using traefik instead of nginx ?
idle session crashes also behind a ALB on AWS.
happy to help out on this issue if needs be?
Hi @dholdaway thanks for the pointer, i'll give traefik a try. My other thought was placing shinyproxy between the UI application and ingress.
Darren has had luck switching ingress to traefk. Rodney to try