Hub access times out with: Error Connection lost. Make sure that Qlik Sense is running properly
The Qlik Sense Hub connection times out faster / sooner than configured in the Virtual Proxy.
When working with an app in the hub, the connection to the app times out faster than configured in virtual proxy (for example, after 5 minutes), and the error message below is displayed:
Connection lost. Make sure that Qlik Sense is running properly. If your session has timed out due to inactivity, refresh to continue working.
This issue occurs when accessing Qlik Sense through a reverse proxy or load balance, but does not occur when accessing Qlik Sense on the same server (https://localhost/hub). The user is also being active on the sheet, i.e. they are making selections etc. to interact with sheet objects.
Here is an example log line that may be seen in the AuditActivity_Proxy logs: ... 76 126.96.36.199 20200115T101930.708-0500 QLIKSERVER 8cd6aa7c-fab5-4e82-a2cd-0681943e7d58 Command=Close connection;Result=0;ResultText=Success d62cfb0a-3355-44a5-9e34-5eaada84be67 1ba723cc-e754-4e24-a42b-0732b24ad924 0 DOMAINNAME user.name 5c5e98cf-3f1f-45ed-96f0-8e76d7c44473 Not available Proxy AppAccess /app/5c5e98cf-3f1f-45ed-96f0-8e76d7c44473?reloaduri=https%3a%2f%2domain.com%2fsense%2fapp%2f5c5e98cf-3f1f-45ed-96f0-8e76d7c44473%2foverview Close connection 0 Backend web socket connection Closed for session 'd62cfb0a-3355-44a5-9e34-5eaada84be67'. ...
Qlik Sense Enterprise, All Versions
Load balancer or Reverse Proxy in front of Qlik Sense
Qlik Sense should not terminate a session earlier than configured in the Virtual Proxy (default is 30 minutes), and when it does the error message would be different: Your session has timed out. Log back in to Qlik Sense to continue.
In this case, if the connection is being lost and it is occurring sooner than configured in the virtual proxy then this indicates that either:
The client is terminating the websocket connection prematurely, or
A network appliance acting on behalf of the client (load-balancer or reverse proxy) is terminating the websocket connection prematurely
Check to see if this issue occurs when using Internet Explorer. Internet Explorer by default adds additional unnecessary traffic to the websocket which can help in these situations. If you do not receive early timeouts when using IE, you can try turning on the Enabling TCP Keep Alive Functionality In Qlik Sense.
The Proxy keep-alive timeout may be increased here which helps in environments exhibiting the behavior mentioned above. See the Keep-alive timeout under the Proxy configuration. See Editing Proxies
If the above does not work, then you will need to make changes to your network infrastructure. Sniffing the network traffic to confirm things further can be performed. As sniffer, Wireshark can be installed on both Qlik Sense Proxy server and Hub client PC to run captures on both ends simultaneously. This may assist confirming the following:
1. Whether Qlik Sense is in fact receiving the TCP FIN packet, closing the TCP connection as expected. 2. Whether it was the client's PC or another network device who is sending the TCP FIN packet to terminate the session. 3. Whether the connection is becoming inactive and from which side (Sense / Client).
Qlik Support may assist in a best-effort basis with the above. Please check out the video below for additional guidance. If further assistance is required correcting the environmental behavior, unfortunately the the task falls outside the scope of Qlik Support as this often is specific to the network involved. If further assistance is needed please reach out to your Account Owner to arrange Consulting Services (or see How to Contact the Consulting Team?)
Network appliances (e.g. Load balancers, reverse proxies, VPN solutions, firewalls, web accelerators, etc) may not see the websocket connection as an "alive" TCP connection, depending on the vendor, and therefore terminate the connection on behalf of the end-user.
The "Backend web socket connection Closed for session" string seen in the logs is registered when a WebSocket TCP layer connection is closed by the transmission of a TCP Packet containing the FIN flag set. This happens when either the browser window or tab is closed or when a network device in the environment drops the TCP connection sessions in a controlled fashion (sends the TCP FIN packet to the Sense server). This can also be sent by the client's computer if there is(are) any setting(s) preventing inactive TCP connections from staying open, as required by the Websocket protocol.