Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jobenni
Contributor
Contributor

Qlik Sense websocket behind NGINX reverse proxy

We are trying to implement JWT authentication. The JWT authentication is working fine but we see the error "Error Connection lost. Make sure that Qlik Sense is running properly...". We have read a lot of posts regarding this issue but none of them fixes the problem.

When looking at the dev console of Firefox, we can see that the request to /jwt/hub/qrsData is returning a 200 status code instead of 101.

It's worth to mention that our Qlik Sense server is behind 2 nginx reverse proxy : public proxy --> internal proxy --> Qlike Sense

This is the simplified configuration on the public proxy :

server
{
  server_name stats.xxx.fr;
  listen 443 ssl;

  ssl_certificate xxx;
  ssl_certificate_key xxx;

  location /
  {
    proxy_pass http://internal-proxy;

    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
  }
}

This is the simplified configuration on the internal proxy :

server
{
  listen 80;
  server_name stats.xxx.fr;

  location /
  {
    proxy_pass https://qliksense.xxx.fr;

    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
  }
}

 

We have installed the "Qlik Sense Websocket Connectivity Tester" and this is the result :

jobenni_3-1654781866609.png

This time, we can see a 500 status code returned

jobenni_2-1654781802633.png

Does anybody have any idea of the source of the problem or know how to fix it ?

It works fine when bypassing nginx.

Our Qlik Sense version is "Qlik Sense February 2022 - 14.54.2"

 

Thanks for helping me!

Best regards

Labels (1)
0 Replies