Qlik Community

Ask a Question

Knowledge Base

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

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY

How to Change the Qlik Sense server hostname

Sonja_Bauernfeind
Digital Support
Digital Support

How to Change the Qlik Sense server hostname


This provide instructions what steps to take, when system administrator requires to change the hostname  / FQDN / machine name where is Qlik Sense server is already installed.

These steps do not require that all Qlik Sense certificates be recreated and re-distributed to the Rim nodes (when applicable) and have been tested to work properly as of the last update to this article on latest versions. If certificate related issues occur please see Qlik Sense: Change hostname (and certificates) after an installation

Please note the information on this article pertain to steps when changing the server's hostname only, and not the Windows domain which it is joined to. When changing the domain please see the links below for more information:


Environment:

  • Qlik Sense Enterprise on Windows, all versions

 

Resolution:


Assumptions:

  • That the Qlik Sense Service account is a domain account and not a local account
  • The Share path for Shared Persistence is shared from the Central node
    • If this assumption is not valid, then you can ignore the steps involving adjusting the share path, unless the share is shared from a Rim node in which the hostname is also being changed.

 

Changing the Central Node's hostname.

Note: These steps also apply in Single node environments.

1. Perform backups: (If this is a VM, creating a revertible image / snapshot is an alternative)

2. Issue a server certificate with the new hostname:

Note: The certificate related steps ensures that once the hostname is changed, the correct certificate is presented to client web sessions, and that the encrypted passwords in the database can still be used by the services. If for any reason this step fails the Data Connection passwords and User Directory Connector (UDC) will need to be reset. See Qlik Sense: Change hostname (and certificates) after an installation

Under the Qlik Management Console (QMC)

  1. Select and enter to Certificates section under Configure System
  2. Add under Machine name the new FQDN / hostname for the Qlik Sense server
  3. Add a password and select Include secret key
  4. For file format pick  Windows format
  5. Hit Export certificate
  6. Go to 'C:\ProgramData\Qlik\Sense\Repository\Exported Certificates' and find the folder with the new host name
  7. Look for the certificate name server.pfx. This is the certificate used later.

3. Stop all Qlik Sense services

4. Change the Startup type for the Qlik Sense Repository Service to Disabled

5. Change the Windows server name / Have the Infrastructure team change the Windows server name, which requires a system reboot.

6. Once system restarts, login with the same admin account and import the server.pfx certificate either by double clicking the file or Importing via MMC to the following store location:   Certificates (Local Computer) > Personal > Certificates. Note: Ensure that the check box is checked to mark the key as exportable.

7. Backup the old server certificate from this same location which is issued to the old FQDN / hostname. 

8. Delete the old Server certificate from this same location.

9. Make a copy of the file %ProgramData%\Qlik\Sense\Host.cfg and rename the copy to Host.cfg.old. This file contains the hostname encoded in base64.

10. Generate a new base64 string for the new hostname. You can generate this string for the new hostname using a site such as base64encode or by running the following PowerShell scriptlet:

[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("qlikserver.domain.local"))

11. Open Host.cfg and replace the content with the new string, and save the file. 

12. Rename the .local certificate folder %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates. (e.g.  \.Local Certificates-old )

13. Change the start up type for the Qlik Sense Repository Service to  Automatic (Delayed Start)

14. Open cmd.exe with administrative rights

15. Change the directory to the Repository install path. Default path C:\"Program Files"\Qlik\Sense\Repository

  • Execute the following command on a single node Qlik Sense site:  
    • Repository.exe  -bootstrap -standalone -restorehostname
  • Execute the following on the Central node of a multi-node environment:
    • Repository.exe" -bootstrap -iscentral -restorehostname

16. Allow the Repository.exe to run for a while

  • Key log events are registered in C:\ProgramData\Qlik\Sense\Log\Repository\Trace\ > System_Repository
    • Since no other services are running, a successful result from this restore command is the Repository to fully initialize but be unable to connect to the other services

17. Test the share locally and from any RIM nodes in the environment and re-share the path if needed.

  1. Right Click on the Windows Icon > Computer Management > Shared Folders > Shares
  2. Be sure to note the permissions on the share so that they can be replicated later
  3. Right click on the Share > Stop Sharing
  4. Navigate to the Share path and re-share with the same permissions as before
  5. Validate permissions in Computer Management

18. Use the QlikSenseUtil at C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe to inject in the new share path. Note: Use alternative installation path if Qlik Sense is not installed to C:\Program Files

19. Start all the Qlik Sense services in the proper order. See Manual Start and Stop order of Qlik Sense services 

20. Update the Qlik Sense Data connections via the Qlik Management Console (QMC):

  • ArchivedLogsFolder: Path to share needs to be updated with the new hostname manually via QMC > Data connections > ArchivedLogsFolder > Connection string
  • AttachedFiles:  Path to share needs to be updated with the new hostname manually via QMC > Data connections > AttachedFiles > Connection string
  • DataPrepAppCache: Path to share needs to be updated with the new hostname manually via QMC > Data connections > DataPrepAppCache > Connection string
  • QLogs: If Central Logging is enabled in the environment, updated with the new hostname manually via QMC > Data connections > QLogs > Connection string

21. Any other Data Connections that used the older server hostname including the ones used by the Monitoring apps or for Centralized Logging may need to be updated if they are NOT setup with the loopback name localhost, and were setup with the old hostname/FQDN such as what is usually configured in a multi-node environment. Monitoring apps Data Connections require the change of two values, 'trustedLocations' and 'url'.

See example under How to set up Monitoring Apps in a clustered environment 

22. If Centralized Logging / Logging Database is enabled in the environment, follow the steps documented under the article below:

 

On the Rim node: (in multi-node environments)

These steps are required once the central node hostname is changed.

  1. Stop all Qlik Sense services on the Rim node.
  2. Open C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe  (default location) and change the hostname that the Rim node would use to connect to the database. Note: May need to launch this program with administrator rights.
    • Under the Connection String Editor, update the Host='<hostname' parameter with the new Central node FQDN / hostname for all databases. (e.g. Database=QSR, QSMQ, etc)
  3. Test if DNS records have been updated in the environment. Otherwise, as a temporary workaround determine the IP address for the Central node and modify the Windows hosts file for both the hostname and FQDN.
  4. In a multi-node Qlik Sense environment, if the postgreSQL databases are on the Central node, update the hostname used by the RIM node's service to connect to these databases (e.g:  Licenses, QSR, SenseServices, and QSMQ) on the Central node.  The following PowerShell script can be run to update the hostname information. (Note: Subsitute MyPassword with the password configured during installation and localhost with the new FQDN string for the Central node). For an alternative and more information see Postgres database moved to new host but some Qlik Sense is still accessing the old database 
# Set the Installation Directory for Qlik Sense
$installDir = 'C:\Program Files\Qlik\Sense\'
# Specify the new password for the qliksenserepository account
$password = 'MyPassword'
$files = Get-ChildItem -Path $installDir -Include Configure-Service.ps1 -Recurse
foreach ($file in $files) {
    $ScriptToRun=$($file.FullName)
    &$ScriptToRun localhost 4432 qliksenserepository $password
}

5. Change the 'trustedLocations' and 'url' values in all the monitor_REST_* Data Connections to the new Fully Qualified Domain Name (FQDN). Any other Qlik Sense Data Connections' Connection string need to be updated to have these values in the Connection string set to the new FQDN of the Central node. These are listed in QMC under the Data Connections section. See example under How to set up Monitoring Apps in a clustered environment 

6. The RIM node points to a FQDN for connections to the QSR database. This is different than in a Single Node environment with postgreSQL installed locally where 'localhost' is used in the connection strings instead of the FQDN to connect to the database. So the listen_addresses setting in the postgres.conf file on the central node needs to be updated if in fact the postgreSQL (QSR) database is hosted on the Central node. The article on step 8 covers this as well. For more information see PostgreSQL: postgresql.conf and pg_hba.conf explained

7. If Centralized Logging / Logging Database is enabled in the environment, follow the steps documented under the article below:

8. Start all the Qlik Sense services in the proper order. See Manual Start and Stop order of Qlik Sense services .

9. Validate that the in QMC, the node are registered as online in the Nodes section.

 

Changing the Rim node hostname:

Note: This requires certificates to be redistributed from the Central node with a new hostname in the Issued To field in the server certificate, but the root CA certificate redistributed is the same one with the Central node 's new or old <FQDN>-CA as the Issued By and Issued To field.

On the Rim node:

  1. Change hostname in Windows as usual.
  2. Restart the server as required by Windows.
  3. Log in as the service account
  4. Stop all the Qlik Sense services
  5. Use Microsoft Management Console (MMC) to backup and delete all the Qlik Sense related certificates. For the certificates that need to be deleted see Backing up certificates - Qlik Sense for Administrators 
  6. Delete or rename %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates
  7. For backup purposes, make a copy of %ProgramData%\Qlik\Sense\Host.cfg and rename the copy to Host.cfg.old
  8. Host.cfg contains the hostname encoded in base64. You can generate this string for the new hostname using a site such as base64encode or by running the following PowerShell scriptlet:
    [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("qlikserver.domain.local"))
  9. Open Host.cfg and replace the content with the new string
  10. Start up Qlik Sense, when it fails to find the certificates it will enter set up mode

Unfortunately it is not possible to adjust the hostname of a node in QMC, so a when a Rim node's hostname is changed you have to then delete and re-add it with the steps below.

On the Central server:

  1. Open Qlik Management Console (QMC)
  2. Click Nodes
  3. Select the node whose hostname has changed
  4. Click Delete
  5. Confirm your decision
  6. Click Create New
  7. Fill in the node details as appropriate.
  8. You will need to recreate and/or modify any rules that specifically named the old node.


Related Content:

Version history
Revision #:
19 of 19
Last update:
‎2021-05-06 08:03 AM
Updated by:
 
Contributors