404, websocket and jquery error using shinyproxy on kubernetes on Azure AKS

Hi,

I try to use shinyproxy in kubernetes (AKS on Azure).
I just re-run the demo from (https://github.com/openanalytics/shinyproxy-config-examples/tree/master/03-containerized-kubernetes, expect I use a loadBalancer in sp-service instead of NodePort).

A catched a lot of error

The first one is with authentication : simple

“request failled with error 403”

2019-03-04%2015_27_35-Hello%20Application

Sometimes I have this error :

“Firefox ne peut établir de connexion avec le serveur à l’adresse ws://13.82.210.208/endpoint/8585f6d0-1af4-4e79-b089-3b81b0c0752a/websocket/.”

2019-03-04%2015_27_35-Hello%20Application_%202

Or this one :

Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/jquery.min.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:9:1
ReferenceError: jQuery is not defined[En savoir plus] shiny.min.js:3:14596

<anonyme> http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/shiny.min.js:3 <anonyme> http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/shiny.min.js:3 

Erreur dans les liens source : SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
URL de la ressource : http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/shiny.min.js
URL du lien source : shiny.min.js.map[En savoir plus]
Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/jqueryui/jquery-ui.min.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:12:1
Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/highlight/highlight.pack.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:14:1
Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/ionrangeslider/js/ion.rangeSlider.min.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:17:1
Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/strftime/strftime-min.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:18:1
Error: Bootstrap’s JavaScript requires jQuery bootstrap.min.js:6:37

<anonyme> http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/bootstrap/js/bootstrap.min.js:6 

Échec du chargement pour l’élément dont la source est « http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/bootstrap/shim/respond.min.js ». 5cc873f2-d754-4fe9-bac8-7f83dfc0f54b:23:1
ReferenceError: $ is not defined[En savoir plus] shiny-showcase.js:255:3

<anonyme> http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/shiny-showcase.js:255 <anonyme> http://13.82.210.208/endpoint/5cc873f2-d754-4fe9-bac8-7f83dfc0f54b/shared/shiny-showcase.js:3 

2019-03-04%2015_27_35-Hello%20Application_3

And each time I refresh the page , I have to authenticate myself again, and again. the app diplay correctly one time every ~10 try.

If I use autentication : simple

I have again websocket issue…

2019-03-04%2015_27_35-Hello%20Application_P4

Any Idea how I can deal with this ?

Regards

Hi @VincentGuyader,

Are you load-balancing multiple shinyproxy instances? In this case you’ll have to configure the load balancer for sticky sessions, to ensure all requests for a proxy go to the instance that launched the proxy.

Hi,

I have the same issue with replica = 1 or replica = 2 :frowning:

other idea ?

Regards

Hi Everyone,
I have had a problem with Websocket handshake, I didn’t have problem in a fresh installed web browser. All the problem was mainly because of something that blocks the web service connection on the browser.

I could connect to my server using a fresh install of Microsoft Edge, although I couldn’t login to my website using Firefox or Chrome over the internet. (FYI, I was using simple auth as well). You know that Chrome and MS Edge are using the same engine. So there is a problem with blocking of the web socket connection between the user and the containers.
What is causing it I don’t know and please let me know when you find it out.

Kind regards,

Mehrdad