Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report

Hub access times out with: Error Connection lost. Make sure that Qlik Sense is running properly

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Hub access times out with: Error Connection lost. Make sure that Qlik Sense is running properly

Last Update:

Sep 2, 2022 7:21:24 AM

Updated By:

Sonja_Bauernfeind

Created date:

Feb 10, 2021 2:27:35 PM

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 12.20.4.0 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'.



Environment:

 

Resolution:


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:

  1. The client is terminating the WebSocket connection prematurely, or
  2. A network appliance acting on behalf of the client (load-balancer or reverse proxy) is terminating the WebSocket connection prematurely

 

Is WebSocket traffic possible?

Qlik Sense requires WebSockets. To verify WebSocket traffic, see Qlik Sense Websocket Connectivity Tester.

 

Enable TCP WebSocket Keep-Alive and HTTP keep-alive timeout.

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 Enabling TCP Keep Alive Functionality In Qlik Sense.

The HTTP 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 - Advanced > Keep-alive timeout (seconds)

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?)
 

Click here for video transcript

 

Cause:

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.

Windows Firewall blocking port 4747. Disable Firewall or apply all ports inbound and outbound

 

Labels (2)
Comments
diagonjope
Partner - Creator III
Partner - Creator III

Thank you Sonja for the detailed description of the problem.  This is one of the most frequent issues for which we receive tech support requests.  I always have handy this URL to test for these problems https://websocketstest.com/

++José

Sonja_Bauernfeind
Digital Support
Digital Support

@diagonjope Anytime 🙂 And thank you for your contribution! 

vegard_bakke
Partner - Creator III
Partner - Creator III

How long does it take before your websocket drops?
Is it consistent? Random?

A forked version of Qlik Sense Websocket Connectivity Tester might tell you if a load balancer is killing your poor websockets, or if something funky is whacking them at random times.

I've uploaded it here: https://github.com/vbakke/QlikSenseWebsocketConnectivityTester

(Thank you for the other test link, @diagonjope. I added it to the Websocket Tester too. 🙂

SGMarquez
Contributor III
Contributor III

Thank you very much to all. Finally it is working and does not disconnect. Thank you 

Ken_T
Specialist
Specialist

in which logs is the "Backend web socket connection Closed for session" error seen for this?

can this be seen on SAAS / QCG without engaging with qlik?

is there anything that the end user sees, maybe in chrome developer tools, that can help determine what is causing this error? "
Connection lost. Make sure that Qlik Sense is running properly. If your session has timed out due to inactivity, refresh to continue working."

sanrout
Contributor III
Contributor III

This error is still occurring even when "websocketpinginterval" value set at 5 seconds reducing from 90 seconds by checking 10 seconds interval step down. Firewall timeout was set at 350 seconds. We are unable to correlate which party is terminating the connection. "Backend web socket connection Closed for session" - this message is registered in the Qlik Sense proxy logs.

ifytra
Contributor III
Contributor III

We faced the same issue on our environment and found out that the root cause was the selected Teaming mode on the server's network interfaces. When we used either StaticTeaming or SwitchIndependent the issue appeared after approximately 45-50 seconds even if we had some activity in the Hub. The behavior stopped when we switched to LACP teaming mode. Bear in mind that you will probably need to discuss with your network team and perform changes on the server's configuration (e.g. define link aggregation groups).

sanrout
Contributor III
Contributor III

@ifytra - Thank you for your response. I do not understand how this recommendation is going to help in avoiding the error. Could you please elaborate the context further ?

ifytra
Contributor III
Contributor III

@sanrout 

In our case, we utilize Windows Network Load Balancer (NLB) feature to redirect user access to Hub in multiple Qlik Sense Proxy servers. During a trial-and-error process for the aforementioned behavior

Examples

  • remove all nodes except one from NLB and use 2 network interfaces in StaticTeaming mode
  • remove all nodes except one from NLB and use 2 network interfaces in SwitchIndependent mode
  • remove all nodes except one from NLB and use 1 network interface
  • use all nodes on NLB and use 1 network interface on all of them

, we found out that in the last two examples we didn't get the Connection lost message

 

Afterwards, we were informed from the network team that the switches, in which QS Proxy server are connected, are configured to use LACP (Link Aggregation Control Protocol). So, after enabling all NICs in NLB members and configure Teaming Mode to LACP the connection lost message stopped. 

I hope this helps.

 

BR,

iLiSA

sanrout
Contributor III
Contributor III

@ifytra,

Thanks for your detailed explanation. According my network team's information, in our infrastructure, we are not using network load balancer. Therefore the above settings may not be applicable.

 

Regards,

Shankar

Version history
Last update:
‎2022-09-02 07:21 AM
Updated by: