Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 6, 2023 9:06:59 AM
Mar 29, 2019 9:05:45 AM
Centralized logging has been deprecated with the Qlik Sense Enterprise on Windows May 2021 release. This article is only valid for previous versions. No support can be provided on Qlik Centralized logging as all Qlik Sense versions using it have reached end of life.
After having successfully changed your Qlik Sense server hostname in an environment where centralized logging is enabled, when attempting to start Qlik logging service you receive
"Error 1064: An exception occurred in the service when handling the control request"
After having enabled centralized logging logs with this article How to enable logging for the Qlik Sense Centralized Logging service, the log returns the following error:
In the Qlik.Sense.Logging.log file, any of the following is registered:
...
[Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] - DevartLogDatabase::Connect failed!
Exception:
No connection could be made because the target machine actively refused it 172.16.16.101:4432
...
[ERROR] - Failed to retrieve settings from database. Error: ["DevartLogDatabase::Connect failed!\nException:\n\tNo connection could be made because the target machine actively refused it 172.16.16.101:4432\n"]
...
[Qlik.Logging.Service.exe] Qlik.Logging.Service [ERROR] - Failed to initialize database. ["DevartLogDatabase::Connect failed!\nException:\n\tNo connection could be made because the target machine actively refused it 172.16.16.101:4432\n"]
May also see the following:
Qlik.Logging.Service [ERROR] - DevartLogDatabase::Connect failed!
Exception:
No such host is known
1. The Qlik Sense Server postgreSQL is not listening on the correct IP address
2. The connection string to the QLogs database has not been updated with the new server hostname
Modify the listen_addresses setting in the postgres.conf file to listen on the address mapped to the new hostname.
Note: Make sure to make a backup copy of postgres.conf before modifying it to contain either a wildcard (e.g "*", as shown on image below) or the new hostname (e.g: the server's FQDN).
The file is found under the following path on the Central node:
C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6
This change requires the restart of the Qlik Sense Repository Database service, or PostgresSQL service if installed on separate server.
For more information see PostgreSQL: postgresql.conf and pg_hba.conf explained
See more information on updating the hostname using the CLI under Qlik Logging Service
Failed to validate logging database. Database does not exist or is an invalid version
example: Qlik.Logging.Service.exe update --hostname QlikServer55.domain.local
Change the hostname with the Qlik Sense "connection string editor"
1. Check the Connection string set in: C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config
To do this, use QlikSenseUtil.exe
2. Try to modify the hostname in your connection string, and hit the save button.
Make sure your file has been changed by clicking the "read" button afterwords.
3. In case your Connection string cannot be changed please try III.
Change the hostname by editing QlikCentralizedLogging.config
Note that this solution is a workaround in case point II. did not work,
By applying this change the centralize logging connection string will be set in clear text and will be no longer encrypted. Make sure to let the customer aware about this.
<connectionStrings>
<add name="qlogs_reader" connectionString="user id=qlogs_reader;password=123;host=QsDBserverFQDN;port=4432;database=QLogs;" providerName="Devart.Data.PostgreSql" />
<add name="qlogs_writer" connectionString="user id=qlogs_writer;password=123;host=QsDBserverFQDN;port=4432;database=QLogs;" providerName="Devart.Data.PostgreSql" />
</connectionStrings>