Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team
With a Shared Persistence Architecture in Qlik Sense, it is important to understand the options which PostgreSQL uses to allow connectivity. These principles are valid no matter whether you are using the Qlik Sense Repository Database service to host the QSR database or using a standalone PostgreSQL instance. The two key files which PostgreSQL uses to define who can connect, how they connect, where they can connect from, and how many connections are allowed are:
In a default Qlik Sense site, these two files will be located in C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6 (for Qlik Sense June 2017 or higher) or C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.3 (for Qlik Sense 3.x Shared Persistence). If using a standalone PostgreSQL server, or a Database as a service (DBaaS) vendor like AWS or Azure this location can vary, so check with the administrator of the database for details on the data directory.
Note: Any changes to these files will require a restart of the Qlik Sense Repository Database or PostgreSQL.
Note: Any lines prefixed with a # are commented out and not active.
In the postgresql.conf, in a basic Qlik Sense configuration, there are two key configuration options which are important:
Where these lines are can vary but an expected single node Qlik Sense site would look like this:
listen_addresses = '*' max_connections = 100
The pg_hba.conf file defines a variety of aspects:
# TYPE DATABASE USER ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::/0 md5 # Allow replication connections from localhost, by a user with the # replication privilege. #host replication postgres 127.0.0.1/32 md5 #host replication postgres ::1/128 md5 host all all 0.0.0.0/0 md5
In this example pg_hba.conf file there two active lines. The first line specifies that all users can connect to all databases from the local loopback IP using MD5 authentication (host all all 127.0.0.1/32 md5). The second line specifies that all users can connect to all databases from any valid IPv4 address using MD5 authenication (host all all 0.0.0.0/0 md5)
Please review our help for references to more sophisticated configurations where specific IP addresses or IP address ranges are covered.
To recap, when ensuring connectivity in a Qlik Sense Shared Persistence environment, especially a multi-node site, the core configurations which are needed are:
What about if we have a Qlik Sense Enterprise Core with 1000 concurrent users at peak. Should I set max_connection to 1000 ?
Hello @mattias
The max connections setting is influenced by the number of nodes, rather than the number of concurrent users.
So: It is best to use a rule of thumb of about 110 connections per node +20. For example, for 1 node would be 110. 4 nodes set to 460, and so on.
All the best,
Sonja
We just had a case von 2022-Febr (which uses PostGre 12.5 I think)
All services were running, but hub/qmc was not working (after a windows reboot),
and windows event log showed:
2022-06-09 11:44:03.130 CEST [6072] FATAL: no pg_hba.conf entry for Host »fe80::329f:ae53:d2bd:8ead%5«, ...
Solution was:
Stop Services.
Edit the pg_hba.conf ,
It already has a line setting permissions for a different MAC-address.
So we copied that line and inserted the MAC-address from the error.
Restarted the services and everything was working again.
My best guess is that during installation the MAC-Address is put into the conf.
But if (as MIGHT have happened in this case?!) the IT changes something in the virtual network adapter of the VM, the address changes after next reboot, and Qlik Sense is no longer working, and you need to do this fix as specified.
edit: it was a single node environment
edit for above post: it is obviously an IPv6 address, not a MAC address.
followup:
for that customer, the IPv6 address changed again, which required redoing that fix.
Which means there is something wrong. Probably only for the PostGre 12.5 Version?!?
Again:
The IPv6 address of the (single node) server is hard coded (during install?) into that one file.
The IPv6 address might change. (not sure how often, not sure if custom specific causes make this more frequent)
IF it changed, the (single node) server is no longer working,
because that one line with the correct hard coded address is required for the (single node) server to keep running.
Does not sound like it is intended, so probably a BUG!?
Looking at the other lines in the file, I do not understand why this one line with the hard coded address is the only thing that determines if it works or not.
Hi @john_oll,
Last week we ran into the same issue you ran into, however not for one customer but for four customers at the same time. All our customers updated and rebooted their server (see my latest post for more details).
When editing the pg_hba.conf file and allowing the IPv6 logged in the error from the event viewer we are unable to restart the Qlik Sense services. We updated Qlik Sense entirely and this did fix the issue.