0 0 Share PDF

Stack deployment via UCP UI fails with 'websocket error, cannot get logs. stack may still have been created'

Article ID: KB000650

Issue

When attempting to deploy a stack via the UCP UI, if websockets are blocked on your UCP load balancer or by a browser plugin/extension, you will receive the following error:

websocket error, cannot get logs. stack may have still been created

Root Cause

A websocket is established during the stack deployment to stream deployment logs from UCP to the browser. If websockets are blocked on a load balancer between the client's browser and the UCP manager(s), the websocket will fail to be established and result in the error above. This behaviour will also occur if websockets are blocked or failing in the client's browser as the result of a browser plugin or extension.

Resolution

  1. If websockets are being blocked by a load balancer, this indicates that HTTPS termination is occurring on the load balancer, permitting the HTTPS traffic inspection and filtering. Per the Docker documentation on load balancing on UCP, since Docker UCP uses mutual TLS, you should make sure to configure your load balancer not to terminate HTTPS connections.

As a result, the resolution is to reconfigure your load balancer not to terminate HTTPS connections for UCP and not to simply update the load balancer to permit websockets. Having reconfigured this, it should be possible to successfully establish a websocket, and this error during stack deployments should be resolved.

  1. Check if the same stack deployment works in different browsers, as well checking with any browser plugins and extensions disabled. Certain browser plugins and extensions can block or otherwise disrupt websocket connectivity.