Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

Error 1064 Unable to start Qlik logging service after hostname was changed

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

Error 1064 Unable to start Qlik logging service after hostname was changed

Last Update:

Jul 6, 2023 9:06:59 AM

Updated By:

Sonja_Bauernfeind

Created date:

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

Environment:

  • Qlik Sense Enterprise on Windows, February 2019 and later

 

Cause:


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

 

Resolution:

 

For  Cause 1 above:

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.

PostgresSQL_listen_addresses.gif

 

 For more information see PostgreSQL: postgresql.conf and pg_hba.conf explained 

 

For  Cause 2 above:

 

I. Update the hostname in the QlikCentralizedLogging.config file via command line.

See more information on updating the hostname using the CLI under Qlik Logging Service

  1. Open CMD.exe as Administrator
  2. Go to Logging folder: cd C:\Program Files\Qlik\Sense\Logging
  3. Execute the following:
    1. Qlik.Logging.Service.exe validate
    2. Verify CentralizedLoggingEnabled: True or False
    3. If an error (example below) is returned instead, also see resolution for cause 1 above.

Failed to validate logging database. Database does not exist or is an invalid version

  1. Change the hostname:
    1. Execute the following command:
    2. Qlik.Logging.Service.exe update --hostname <newhostname>
      example: Qlik.Logging.Service.exe update --hostname QlikServer55.domain.local​
  2. Verify the hostname is showing in the connection string as shown on the image below, and per II.1 below.
  3. Make sure CentralizedLoggingEnabled is true, and start the Qlik Logging Service in services.msc.

CentralizedLogging_HostnameChange.gif

 

II. Change the hostname: Connection String Editor

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

  1. Go to %Program Files%\Qlik\Sense\Repository\Util\QlikSenseUtil.
  2. Open QlikSenseUtil.exe as Admin (right-lick > run as administrator).
  3. In QlikSenseUtil.exe > connect to the database with your superuser password then select "Connection String Editor".
  4. In the file  path to config file, place C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config
  5. Compare the host set in the connection string with the current FQDN of the server
  6. If the hostname is different, first backup file C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config  before making any change

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. 

 

III. Change the hostname: Config file changes

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. 

  1. Backup file C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config  before making any change
  2. Edit QlikCentralizedLogging.config as follows
  3. Copy the current connection string in a text editor, by using the QlikSenseUtil.exe .
    Please refer to II.1) to do this
    1. open file C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config
    2. Find and remove "<connectionStrings configProtectionProvider="DataProtectionConfigurationProvider"> "  all the way to " </connectionStrings>
    3. Replace with with the connection string you saved in a., corrected with the new server FQDN
      <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>​

       

    4. If it still does not work, and your Database is stored on the same server,  replace to host=localhost
Labels (1)
Version history
Last update:
‎2023-07-06 09:06 AM
Updated by: