Trouble setting up websocket-proxy

I’m trying to build HA Server
I set rancher to port 8080 with CATTLE_HOST_API_PROXY_MODE=ha and CATTLE_HOST_API_PROXY_HOST=myproxyhost:8081
then start websocket-proxy to port 8081
with command like this
docker run -d -p 8081:8085 -v $(pwd)/api.crt:/api.crt rancher/server websocket-proxy -jwt-public-key-file=/api.crt -listen-address=0.0.0.0:8085
or this
docker run -d -p 8081:8080 -v $(pwd)/api.crt:/api.crt rancher/server websocket-proxy -jwt-public-key-file=/api.crt -listen-address=0.0.0.0:8080
but both style not work for me
still got 404 page not found.

Please clarify step 8 : Bring up the websocket-proxy
and how to config CATTLE_HOST_API_PROXY_HOST properly.

Thank you

1 Like

@Hilda_Merom, you’ll also need to specify -cattle-address= (include :port if needed) This tells websocket-proxy where to forward requests.

everything else looks correct.

2 Likes

I’m trying to setup websocket proxy server - external access for my application. When I tried to create rancher server with necessary websocket proxy server settings, only the rancher is created. No idea about websocket-proxy container?

Command:
docker run -d -e CATTLE_HOST_API_PROXY_HOST=app_server_ip:8000 -p 8080:8080 -v $(pwd)/api.crt:/api.crt rancher/server websocket-proxy -jwt-public-key-file=/api.crt -listen-address=0.0.0.0:8080 -cattle-address=rancher_ip:8080

Will there be two containers like rancher and websocket-proxy? I’m getting the error as:

2018/03/05 09:25:01 http: proxy error: net/http: request canceled

Any help would be appreciated. @vincent