Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1639

Streamlit frontend website is unable to establish a WebSocket connection

$
0
0

I have an issue when I try to deploy my streamlit app from my windows server to my corporate PC... The problem seems to be related to the WebSocket connection… On my PC browser, I see this error:

WebSocket connection to 'wss://XXXXXXXX/_stcore/stream' failed:

Here is my NGINX config file:

#user  nobody;worker_processes  1;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {    worker_connections  1024;}http {    include       mime.types;    default_type  application/octet-stream;    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '    #                  '$status $body_bytes_sent "$http_referer" '    #                  '"$http_user_agent" "$http_x_forwarded_for"';    #access_log  logs/access.log  main;    sendfile        on;    #tcp_nopush     on;    #keepalive_timeout  0;    keepalive_timeout  65;    #gzip  on;    server {        listen       8501; #80        server_name  localhost;        #charset koi8-r;        #access_log  logs/host.access.log  main;        location / {            root   html;            index  index.html index.htm;        }        location /stream {            proxy_pass  http://127.0.0.1:8501/stream;            proxy_http_version 1.1;            proxy_set_header Upgrade $http_upgrade;            proxy_set_header Connection "upgrade";        }        #error_page  404              /404.html;        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;        location = /50x.html {            root   html;        }    server {        server_name XXXXXXXXXX;#my_domain        listen [::]:443 ssl; # managed by Certbot        listen 443 ssl; # managed by Certbot        ssl_certificate "C:\Users\YYYYYYYYYYY\cert.pem"; # managed by Certbot        ssl_certificate_key "C:\Users\YYYYYYYYYYY\key.pem"; # managed by Certbot        #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot        #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot        keepalive_timeout 10;        location / {            proxy_pass http://127.0.0.1:8502/;            proxy_set_header Host $http_host;            proxy_set_header X-Real-IP $remote_addr;            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;            proxy_redirect off;            proxy_http_version 1.1;            proxy_set_header Upgrade $http_upgrade;            proxy_set_header Connection "upgrade";            proxy_read_timeout 86400;        }        location /_stcore/stream {            proxy_pass http://127.0.0.1:8502/_stcore/stream;            proxy_http_version 1.1;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            proxy_set_header Host $host;            proxy_set_header Upgrade $http_upgrade;            proxy_set_header Connection "upgrade";            proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extentions;            proxy_read_timeout 86400;            proxy_set_header X-Real-IP $remote_addr;            proxy_set_header X-Forwarded-Proto $scheme;        }        # location ^~ /healthz {        #     proxy_pass http://127.0.0.1:8502/healthz;        # }    }}

And my Streamlit config file

[server]port = 8502enableCORS = falseenableXsrfProtection = falseheadless = true

I have tried many configurations but none worked... Any help would be greatly appreciated !


Viewing all articles
Browse latest Browse all 1639


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>