Problem with Bokeh regquest arguments and Load Balancing via nginx

Hello everyone,

for our current project it is important to give some request arguments to a bokeh server. The chart is included in a Plone page. We get the script using the autoload_server-Function and adding the request arguments.

When Plone renders the Chart in first time, everything ist fine and the arguments are available.
Then it opens the websocket connection and all arguments are missing espesially the path and the remote_ip

Log output:
2017-09-21 11:36:40,792 arguments: {‘bokeh-absolute-url’: [‘http://test_bokeh.de/example’], ‘path’: [’/Plone’], ‘bokeh-autoload-element’: [‘9b0ee046-53b6-40ee-b9af-78de9e8e5705’], ‘bokeh-app-path’: [’/example’], ‘remote_ip’: [‘127.0.0.1’]}
2017-09-21 11:36:40,813 200 GET /example/autoload.js?bokeh-autoload-element=9b0ee046-53b6-40ee-b9af-78de9e8e5705&bokeh-app-path=/example&bokeh-absolute-url=http://test_bokeh.de/example&path=/Plone&remote_ip=127.0.0.1 (127.0.0.1) 112.48ms
2017-09-21 11:36:41,158 101 GET /example/ws?bokeh-protocol-version=1.0&bokeh-session-id=KZ6uOcDHs1S70MiU12xKq5mPHy9lwqGe1fQ227MgAXDt (127.0.0.1) 0.59ms
2017-09-21 11:36:41,158 WebSocket connection opened
2017-09-21 11:36:41,239 arguments: {}
2017-09-21 11:36:41,253 ServerConnection created
2017-09-21 11:36:44,426 arguments: {}

This only happens, when we use load balancing done by the nginx. When we use a single bokeh server, everything works fine.

My Config looks like:

upstream myapp {
least_conn; # Use Least Connections strategy
server 127.0.0.1:5006; # Bokeh Server 0
server 127.0.0.1:5007; # Bokeh Server 1
}

server {
listen 127.0.0.1:80;
server_name www.test_bokeh.de test_bokeh.de;

access_log  /tmp/bokeh.access.log;
error_log   /tmp/bokeh.error.log debug;

location / {
    proxy_pass http://myapp;
    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;
}

location /static {
alias path/to/bokeh-0.12.9-py2.7.egg/bokeh/server/static;
}

}

As I understood the bokeh chat yesterday, the arguments should be available. Can somebody help me with this problem?

Best regards,
Sandra Rum