Hello. I am very frustrated about datalore is only service in our infrastructure, that cannot worked over nginx proxy with websocket configuration.
All headers in non-proxy and proxy requests the same.
I read this post: Datalore Enterprise On-premises WebSocketError,
but not really find a solution for me.
Wireshark trace of direct connection to dl server, correct:
GET /wsdp?connection_id=9iHisXXLkNrHMphOFfQz1T&client_id=mQtj7dJ69Uv1ew3GC7VBsU HTTP/1.1
Host: 10.0.0.6:8086
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0
Accept: */*
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Sec-WebSocket-Version: 13
Origin: http://10.0.0.6:8086
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: kVw2Jw3sY12LQo2mbl8h4g==
Connection: keep-alive, Upgrade
Cookie: *******
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
HTTP/1.1 101 <<< correct!!!
Upgrade: websocket
Connection: upgrade, keep-alive
Sec-WebSocket-Accept: GriXpGNzz72V+sChcLNus3dteac=
Sec-WebSocket-Extensions: permessage-deflate
Date: Mon, 23 Sep 2024 13:11:22 GMT
Keep-Alive: timeout=20
Wireshark trace of connection over nginx reverse proxy, incorrect:
GET /wsdp?connection_id=U0iSQB4KVyBC6SfDYGqDO3&client_id=rgKG4A4x3ywVJoplrrCiRl HTTP/1.1
Upgrade: websocket
Connection: upgrade
Host: 10.0.0.6:8086
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0
Accept: */*
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br, zstd
Sec-WebSocket-Version: 13
Origin: https://dl.*******.org
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: zstNcVpksB8lTdS6BWQJIQ==
Cookie: *********
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-origin
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.1 200 <<< incorrect, why??? !
Content-Length: 0
Date: Mon, 23 Sep 2024 13:15:38 GMT
Docker compose section:
version: "3.9"
services:
datalore:
image: jetbrains/datalore-server:2024.3
ports:
- "8086:8080"
expose: [ "8081", "5050", "4060" ]
networks:
- datalore-agents-network
- datalore-backend-network
volumes:
- "./datalore-storage:/opt/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DATALORE_PUBLIC_URL: "https://dl.*******.org"
nginx config section:
location / {
proxy_pass http://10.0.0.6:8086;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
#proxy_cache_bypass $http_upgrade;
#proxy_buffering off;
#keepalive_timeout 1h;
}