Bokeh application failing to load Js files on backend

Hi There,

I have deployed a simple application in azure kubernets which takes one file and creates a grid plot on file data.

The application is running on behind on ngnix and application gateway backend.

This is not a failure to load JS files. Rather, this is the websocket connection failing to connect, which usually indicates a configuration issue of some sort.

Please expand the messages to show the the full error. Also, does the Bokeh server show any errors in the console?

here is full log from console.

this is from pod log.

Unfortunately there is not really any helpful information there at all. I was hoping to see a 503 rejection from Bokeh, which is typically fixed by a simple configuration change to the Bokeh server. Lack of that means that this is probably something to do with your network configuration, i.e something is blocking the websocket connection. That might be a proxy or firewall or or something else. I won’t be possible to speculate without more information about your networking environment. As another first step it would be good to verify that running an viewing locally on a single machine works.

The application is running on pod IP and ngnix IP. Application is failing to connect when we route the application via application gateway hostname.

Nginx has to be configured to proxy websockets. You can see an example configuration here:

But that’s also only one possibility. If something else in your network environment is blocking websockets, e.g. then Bokeh server apps will simply not be an option for you unless you can lift that restriction. All of this is outside our control and on your end, however.

TLDR; websocket connections must be allowed and proxied properly.

i Have followed following setting fro ngnix ingress controler. but still it is not working.
location /plm-analysis {
proxy_pass http://127.0.0.1:5100;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
proxy_buffering off;
}

This is my application running code : bokeh serve /app/main.py --show --prefix=‘plm-analysis’ --address 0.0.0.0 --allow-websocket-origin=’*’

You will have to check nginx or other network stack error logs for clues. The connection is not getting blocked or rejected Bokeh itself, so unfortunately there is not much more I can offer at this point.

Edit: but I will mention, if you have a main.py in a directory, then the usual expected usage is to invoke the bokeh server with the directory rather than the module:

bokeh serve /app ...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.