OasisPlatform icon indicating copy to clipboard operation
OasisPlatform copied to clipboard

Oasis UI - idle session crash

Open sambles opened this issue 3 years ago • 7 comments

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)

  1. Login (works)
  2. Idle for a few mins on any page
  3. UI app grey out crashes

Version / Environment information

UI 1.11.3 Newer platform build (platform-2.0)

sambles avatar May 18 '22 09:05 sambles

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

sambles avatar Jun 09 '22 12:06 sambles

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/

sambles avatar Jun 21 '22 08:06 sambles

Something is wonky with the websocket connection

Screenshot from 2022-09-14 14-38-51

https://www.civo.com/learn/using-websockets-with-ingress-controller https://stackoverflow.com/questions/52883653/nginx-ingress-controller-websocket-support#52884066

sambles avatar Sep 14 '22 13:09 sambles

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

sambles avatar Sep 15 '22 09:09 sambles

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?

dholdaway avatar Sep 29 '22 14:09 dholdaway

Hi @dholdaway thanks for the pointer, i'll give traefik a try. My other thought was placing shinyproxy between the UI application and ingress.

sambles avatar Sep 29 '22 15:09 sambles

Darren has had luck switching ingress to traefk. Rodney to try

benhayes21 avatar Feb 23 '24 10:02 benhayes21