Thursday 27 September 2018

QlikView


Processing with QLIK


Issues With CPU in QLIK

--> Not able to utilize full performance of CPU

1) Description:-

The number of CPU affinity for the QVS does not match the CPU cores in the Server.

   Cause:-

This issue comes from a new BIOS setting introduced in the Generation 9 of HP servers.
A new setting has been added in BIOS that needs to be modified to allow the QlikView services properly detect all the CPU Cores in the machine.

  Resolution:-


This issue can be resolved by changing the BIOS setting "NUMA Group Size" to "Flat".
The default setting for "NUMA Group Size" disables QlikView from properly detecting all
CPU cores in the hardware, and thereby
From HPs manual on the subject: "Use this option to configure how the system ROM reports
  the number of logical processors in a NUMA (Non-Uniform Memory Access) node. The
  resulting information helps the operating system group processors for application use. To set             

NUMA Group Size Optimization:

   From the System Utilities screen,
   select System Configuration →
   BIOS/Platform Configuration (RBSU) →
   Performance Options →
   Advanced Performance Tuning Options →         
   NUMA
  Group Size Optimization and press Enter.
  Select a setting and press Enter:

Clustered (default)—Optimizes groups along NUMA boundaries, providing better performance.
Flat—Enables applications that are not optimized to take advantage of processors spanning                  multiple groups to utilize more logical processors."


======================================================================


2) Description


NUMA, Non-Uniform Memory Access, is a computer memory design used in Multiprocessing, where the memory access time depends on the memory location relative to a processor. Under NUMA, a processor can access its own local memory faster than non-local memory, that is, memory local to another processor or memory shared between processors.

QlikView generally performs better with NUMA disabled. The NUMA setting is controlled by the computer BIOS, and the recommendation is to disable it for best possible performance.

Some hardware does not allow disabling NUMA. For these scenarios QlikView 11.20 SR2 and later can automatically detect the presence of NUMA and if present adjust the QVS.exe to adapt to a NUMA environment. While not as efficient as disabling NUMA in BIOS, it restores some of the performance lost when NUMA is enabled.

The automatic detection only works in 2 or 4-socket systems. For 8 socket machines the NUMA detection fails, leaving the QVS.exe to believe itself to exist in a non-NUMA environment.

The software NUMA adaption is controlled with the EnableNumaRoundRobin variable in the QlikView Server settings.ini file.

From the tests which Performance & Scalability team is doing on new releases they have not seen any NUMA specific changes in QV 12.10 and 12.20.

The recommendations can be found on community: https://community.qlik.com/docs/DOC-2362 they are being updated if Performance & Scalability team sees that changes in server configurations impacts the performance. So it worth checking them from time to time.

Please keep in mind that Performance & Scalability team tries to test many hardware configurations, but it is still a very small subset of possible server configurations seen in customer deployments. Due to this, in case of doubt they suggest to test the settings impact. For example one customer might on average see that for their deployment disabling NUMA in BIOS is beneficial, while other might not notice any difference.



Resolution:-



EnableNumaRoundRobin

0 (default): Automated state where QlikView Server at startup detects whether NUMA is enabled or disabled at certain hardware and adapts to it. If NUMA is enabled QlikView Server will ignore NUMA nodes when allocating memory.
1: QlikView Server  is acting as if NUMA is enabled from BIOS (without any attempts to detect it)
2: QlikView Server will not ignore NUMA nodes if present (i.e. NUMA enabled)

The Settings.ini file can be found in the following location:

Windows Server 2003
C:\Document and Settings\All Users\Application Data\QlikTech\QlikViewServer
Windows Server 2008 and later
C:\ProgramData\QlikTech\QlikViewServer for Windows 2008 and later





========================================================================

3)  QlikView and NUMA 



NUMA technology typically provides performance gains over other multiprocessing
architectures especially if a software application is designed to take advantage of NUMA. However, extensive
tests at our Scalability Center prove that NUMA-enabled servers have a negative impact on QlikView Server
performance. This impact is less noticeable on systems with fewer CPU sockets as the need to access remote
memory is reduced. Therefore, for NUMA architectures, it is beneficial to disable NUMA in the BIOS settings of
the hardware running the QlikView Server in order to achieve optimum performance. Some vendors have removed
the ability to turn off NUMA in the BIOS. If that is the case, a soft-switch has been implemented into the QlikView
configuration which circumvents NUMA memory allocation. Since QlikView 11.2 SR2, QlikView will automatically
detect if NUMA has been disabled and adapts appropriately for optimal performance. (For QlikView releases prior
to QV11.2 SR1, see this document for more information on this setting: http://community.qlikview.com/docs/DOC-23
62) If a QlikView application (.QVW) is opened and loaded into memory on a NUMA-enabled system with the
soft-switch logic disabled, the operating system will use the local memory for one CPU at a time. When necessary,
it will use remote memory within another NUMA node (See Figure 1). (CPU access time to its local memory is
much faster than access to remote memory). QlikView scales well over multiple cores resulting in those cores
needing access to the same memory if “everything” is stored in one place. Since QlikView is not optimized for
NUMA, please take note of the soft-switch setting for QlikView versions prior to 11.2 SR2 or disable NUMA in
the BIOS if applicable.
========================================================================

Servers running QIX engine benefit from the following settings on average:


Setting/Configuration
Value
Hyper-threading
Enabled 4 socket /Disabled 2 socket

Note: For 4-socket solutions, having hyper-threading enabled is beneficial on average. There are, however, cases when disabling it leads to improved performance.
Power Management (Power profile)
Max performance (BIOS and Windows setting)
Node Interleaving
Enabled (meaning that NUMA is disabled)

Note: Disabling NUMA has no significant impact on the performance as the product adapts its behavior if NUMA is enabled.
Intel Turbo Boost
Enabled
Memory configuration
Configured for best performance

Note: The DIMM slots for every CPU should be populated in accordance to the hardware manufacturer’s specification for best performance.
Hardware pre-fetch
Enabled

=======================================================================
Test done by users:-

Scheduled 40 concurrent QVW reloads in the QDS (the QVW's generated data, wrote QVDs, read QVDs, and then logged stats).

The test hardware was a HP DL580 G7 with 4 X Intel Xeon Processor E7-4870 (4 CPU X 10 cores) and 256GB RAM.  By disabling hyperthreading, the average document refresh time went from 02:53 to 01:50.

=============================================================

Conclusions:-



-->Preferably we need to have utmost 2 sockets of CPU cores at the Max for QLIK.
-->Disabling NUMA is Advised if performance is not good.
-->If you don't have option to disable then do soft switch enable.
( if in case NUMA cannot be disabled, "EnableNumaRoundRobin=0" has to be written in "setting.ini" under "QlikViewServer" folder.
EnableNumaRoundRobin=0 is defaulted and means disabled functionality.
EnableNumaRoundRobin=1 means enable functionality which should be used for servers where NUMA cannot be disabled in the hardware)

-->Hyper-threading should be turned off to achieve maximum CPU Utilization.


Friday 21 September 2018

Assigned Named CALs not loading on License Page

QlikSense


Assigned Named CALs not loading on License Page



Error when clicking on the "Add User" icon:
Not found: EntLicenses.Properties.CalInfo.AssignedList.AddAssignedUsers

Cause 

This is caused by a garbled Machine ID in BorrowCALData.PGO.
In order to see it, follow Article #2773 Reading PGO contents and CAL assignements

Resolution 

Follow these steps: Stop all QlikView services;
Rename BorrowCALData.PGO found in the configured root directory and default ProgramData QlikViewServer folder: c:\ProgramData\Qliktech\QlikViewServer
Default root: c:\ProgramData\Qliktech\Documents

Start all QlikView Services.

Monday 17 September 2018

Inspecting Qlik Sense websocket communication


QlikSense


Inspecting QlikSense websocket communication





Inspecting Qlik Sense websocket communication is useful for a variety of reasons. Let’s see how to inspect websocket traffic, and then what to look for when it comes to websocket traffic from the Qlik Sense Engine.



HOW TO INSPECT WEBSOCKET TRAFFIC

Before you get started checking out websocket traffic from Qlik Sense, you must know how to use browser dev tools to inspect websocket traffic. Open a tab in Chrome and open the dev tools for that tab, then navigate to a Qlik Sense app or mashup. Now in dev tools, go to the network tab, and filter for WS. You should see the websocket listed, select it. Now notice the tabs for headers, frames, cookies, and timing. You can inspect request and response headers in the headers tab, see cookies sent with the request in the cookies tab, and check out the load time in the timing tab. But the frames tab is where the action is. Click on that and you can see all of the messages sent and received over the websocket.







websocket.png



WHAT TO LOOK FOR WITH QLIK SENSE WEBSOCKET TRAFFIC


All the communication with the Qlik Sense engine happens over the websocket. You can see the messages for authenticating and connecting, opening a doc, creating and fetching objects, getting layouts, and more. You’ll want to match messages sent, which are highlighted in green, with its response message. Both will have the same id.



Here’s an incomplete list of good uses for checking out the websocket communication:



CHECKING THE STATUS OF THE CONNECTION


The first two frames should always be the responses for authentication and connection. In the authentication response, you can see the user id and directory, the logout uri, and whether authentication is required or not. In the connection response, you can see that the connection was successful and whether a new session was created, or a session was attached to an existing session. If the session was attached, that means its sharing the session with another existing session. This is what you would want to check if you were opening up two or more websocket connections to the same app and wanted to make sure the connections were going to share the same session. You can also see the messages sent and received when opening a doc, which can sometimes be useful debugging any issues.



DEBUGGING


This one’s kind of obvious but should be mentioned. Here’s an example. If you’re trying to embed objects and they’re not showing up on the page, you should inspect the websocket communication. You can check to make sure that a connection is made, the doc has been opened successfully, and the getObject message has been sent. Then you can check the response message to see if it tells you anything about your issue. If you try to get an object but have the wrong id, for instance, you’ll see that you don’t get an error for anything, but the response just doesn’t contain an object, which is a good indication that you just requested an object that doesn’t exist.


Change Root Directory in Sense Server

QlikSense

Change Root Directory in Sense Server


Navigate to the Service Cluster section of the QMC to determine the current share path
Create a new folder for share on the intended destination
Share this path
Right Click > Properties
Share > Share
Add in the service account to have Read/Write permissions
Copy the Network path to a text editor for reference later
Stop all Qlik Sense services except for the Qlik Sense Repository Database / PostgreSQL on all nodes
Move the Apps, ArchivedLogs, CustomData, and StaticContent folders from the previous share location to the new share

Open the QlikSenseUtil.exe file (default location C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe)

If you've customized the installation path for Qlik Sense then it will be located at Drive:\Path\Where\Installed\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe with adjustments to the bolded section to point to where Qlik Sense has been installed
In QlikSenseUtil
Click on the Connect to database button to connect to the underlying Repository Database
Host Name: Enter the hostname of the Repository database
Most situations would use localhost here if run from the Central Node
Database user: qliksenserepository
Unless you've configured the site to run using a different account. This is extremely rare
Password: password for the qliksenserepository user
Next click on the Service Cluster section and click OK to retrieve the current share path values
Replace the existing values with the new share path
Ensure that there are no double slashes in the paths (e.g. \\QlikSense\\Apps) as this is not a logical Windows path

Example before values:


Example after values:

Click on Save to save the values in the underlying Qlik Sense Repository Database
Click on Clear to clear the values and then OK to retrieve the values which exist in the underlying database to ensure that the previously entered values were saved in an expected manner
It is ideal here to copy one of the paths and ensure that they work as expected in Windows
Start all previously stopped Qlik Sense Services


Migrating Qlik Sense from One Server to Another

QlikSense

Migrating Qlik Sense from One Server to Another

On original server

In QMC, go to Certificates section and export new certificates using the FQDN of the new server.
Be sure to include the Private key
We need the certificates to be in the Windows format
Record the UNC root path specified in the Service Cluster section in the QMC
Stop all services except for the Qlik Sense Repository Database
Create a new folder for the backup, e.g. C:\backup
Open MMC and Export the Trusted Root Certificate used by Qlik Sense from the Local Computer / Computer Account snap-in. And place it into the backup folder
Be sure to include the Private key
Take a backup of the database (relevant help link)
Sample command:

"C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\pg_dump.exe" -h localhost -p 4432 -U postgres -b -F t -f "c:\backup\QSR_backup.tar" QSR

Copy all subfolders in the UNC root specified in the Service Cluster Section in the QMC to the backup folder
Copy the Server certificate from the Exported Certificates folder to the backup folder (default: C:\ProgramData\Qlik\Sense\Repository\Exported Certificates)
Optional:
Zip the Backup folder for ease of transfer


New Server

Install Qlik Sense of the same version
During the installation process uncheck the check box to start services after installation. We will want to do extra configuration before Qlik Sense initializes
Transfer the backup from the old server to local disk on the new server
While the installer is working:
Import the Trusted Root and Server certificate into the Local Computer / Computer Account snap-in section in their appropriate areas:
Server > Personal
Trusted Root > Trusted Root Certification Authorities
Ensure that you mark the certificates as exportable
Once the installation has finished, start the Qlik Sense Repository Database
Restore the backed up copy of the database
Sample command: "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\pg_restore.exe" -h localhost -p 4432 -U postgres -d QSR "c:\backup\QSR_backup.tar"
If using a different share path for the Qlik Sense content
Copy all subfolders from the UNC root specified in the Service Cluster Section in the QMC on the old server into a newly configured UNC path for the new server
Open QlikSenseUtil
Default path C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil\QlikSenseUtil.exe
Click Connect to database
Enter superuser credentials
Click OK
Go to the Service cluster section
Click OK to get the current values
Make the appropriate edits
Click Save
To validate that the changes have been recorded:
Click Clear
Click OK

To launch Qlik Sense with the new hostname:
Open cmd.exe with administrative rights
Change the directory to the Repository install path
Default path C:\"Program Files"\Qlik\Sense\Repository
Execute the following command: Repository.exe -standalone -restorehostname
Allow the Repository.exe to run for a while
Key log elements 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
End the Repository.exe process in Task Manager
Start all Qlik Sense services


Access the QMC and/or Hub to confirm that all previous working functionality is present

Sense Monitor App Reload Failure

QlikSense

QlikSense Monitor App Reload Failure



Please perform the following:


1. First, it's very important to verify that the Service Account is added to your proper AD Group and is an admin, especially if your UDC in the QMC uses an LDAP filter.


2. If the user account to run the Qlik Sense Services has changed, follow these instructions. If not, please skip this step:



 http://help.qlik.com/en-US/sense/November2017/Subsystems/PlanningQlikSenseDeployments/Content/Deployment/Change-user-accounts.htm



3. Temporarily disable antivirus, and then open all ports in the firewall that are needed according to the only documentation for the November release.


4. Check that all services are running and can be restarted, as well as verifying the user account running them.


5. Now, let’s dive into the Admin Portal and have you open the QMC


6. Delete all connections in the "Data Connections" tab that begin with "QRS_" (before June 2017) and "Monitor_Apps_" (after June 2017) -- delete all of them for both with those names


7. Delete all monitoring apps in the "Apps" tab that are named License Monitor, Operations Monitor, etc.


8. Minimize QMC. Delete all "QVD" files within the Windows Directory that related to the monitoring apps (usually C:\ProgramData\Qlik\Sense\Log"). All files related to "reloads", "governance", "monitor", "etc... any QVD file listed in this Log folder needs to be deleted except ones with "central logging"


9. In addition, go to the shared ArchivedLog shared folder in Windows and ZIP all log files especially the Engine logs, as anything older than 6 months can sometimes cause the reloads to fail. Once a ZIP is done, delete all log files.


10. Open QMC


11. Check the Virtual Proxy to see if they use a prefix. If so, this prefix needs to be included in the DC connection strings.


12. Check the Proxy and verify the HTTPS Default port is 443. If not, update the DC connection strings.


13. Check the Proxy and verify that Kerberos Authentication is notenabled.


14. It is required that at least one virtual proxy uses the Windows authentication pattern for the monitoring apps to work. Please confirm you are using "Windows" in the Virtual Proxy settings under the "Authentication" section.


15. Now, in the Apps section of the QMC, import the new default monitoring apps using the "Import" button within the "Apps" section of the QMC. C:\ProgramData\Qlik\Sense\Repository\DefaultApps


16. After which, click on "Tasks" under "Associated Items" for each Monitoring App that was imported and create an automatic rule to have them automatically refresh. Set the time for the first start to 1 minute from now so that the trigger will automatically kick off once you save.


17. Go to the "Data Connections" section of the QMC to verify that new "QRS_" (before June 2017) or "Monitor_Apps_" (June 2017+) data connections were re-created.


18. Open one of them and view the entire connection string. Verify that this exists in the string ";skipServerCertificateValidation=true;"


19. Verify if https://localhost (June or newer: listed twice in each data connection and both must be updated; 3.2.5 or older: listed once) or the FQDN should be listed in each connection string and change if needed. FQDN is required for multi-nodes or cloud solutions.


20. Go to the Apps section, click on the monitoring apps that were imported, choose "More Actions" and click "Reload Now".


21. Go to the "Tasks" tab to see if they reloaded. Hit refresh in the top right of the QMC page.


22. If the task fails, open each Data Connection beginning with "QRS_" (before June 2017) or "Monitor_Apps_" (after June 2017), and put in the User ID and Password for the Service Account running the Qlik Services. This account must be an administrator with Full Control and be a part of the required AD Groups listed in the installation guide.


23. In November 2017 release there is a code related issue. If it’s an upgraded November 2017 (non-patch) release then use a copy of the September 2017 mon app QVF files, in the QMC import them, then replace the November mon app files. The Data Connections and QVD files in the folder may or may not need to be deleted; trial and error.


24. Reload tasks manually and collect the Script Reload Logs.




Applying an SSL Certificate to Qlik Sense


Qliksense 

Applying an SSL Certificate to Qlik Sense



Below we outline the process to apply an SSL Certificate to a Qlik Sense server. This is requires prior knowledge of server operating system basics and admin rights.

1. Launch the MMC



2. When the MMC opens go to File|Add/Remove Snap-in. 
3. Click on the Certificates snap-in on the left side list box and click the add button. 
4. Choose Computer account and click Next.

5. Leave Local computer selected and click Finish. 
6. Click OK to go back to the MMC. 
7. The Local computer certificate store opens Right click on the Personal folder and choose Import.




8. Because we have specified the location to import a certificate, the store location choice is greyed out. Click Next.



9. Browse to the location of the certificate containing private key (the pfx file) and click Next. 
10. Enter the password set during certificate merge process.

11. Prompted with the Certificate store to place the certificate, make sure the radio button is highlighted for Place all cert... and the store is Personal. Click Next.

12. Click Finish and the certificate will be imported. 
13. Double click on the imported certificate and choose details.
14. Navigate down the list and click on Thumbprint.

15. Copy the thumbprint with spaces from the textbox. 
16. Browse to the Qlik Sense QMC. 
17. Click on the Proxies menu item.

18. Choose the appropriate proxy to input the thumbprint to use the 3rd party certificate. Click edit to open the proxy settings. 
19. Click on the security option and enter the thumbprint (with spaces) in the textbox. Click Apply. The QMC will ask to restart. Please click the Restart QMC button. You may be required to refresh the browser as well.


Node show RIM as "Node is offline"

QlikSense


Node show RIM as "Node is offline"


The certificates are installed on the RIM and the qlik services on the RIM are running.


This is in the repository system trace log located at:
C:\ProgramData\Qlik\Sense\Log\Repository\Trace\*System_Repository.LOG

67 20170830T130400.104-0500 INFO qlikServerName System.Repository.Repository.Core.SystemInformation 8 8caa1faa-d256-4ee5-af88-0bec186abe6c DOMAIN\qlikSvc Exception encountered when fetching app migration hash, still trying. Failed attempts: 5 The remote name could not be resolved: 'qlikServerName.domain.com' at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)↵↓ at Qlik.Sense.Common.Communication.REST.Client.WebClientEx.GetWebResponse(WebRequest request, IAsyncResult result)↵↓ at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result) 8caa1faa-d256-4ee5-af88-0bec186abe6c


The DNS is not resolving the central node FQDN (name resolution is not happening)


Cause

lack of DNS resolution in the local network


Resolution

- Network Admin to configure adapters/DNS for proper DNS resolution.
- Edit hosts file on all nodes to contain each node IP and FQDN of each node in the       environment.


NOTE: hosts file can be located at ... C:\Windows\System32\drivers\etc


Sunday 16 September 2018

No Hub or QMC access after upgrade to Sense November 2017 or higher - recursive script

QlikSense


No Hub or QMC access after upgrade to Sense November 2017 or higher - recursive script


This article uses the recursive (recurse) cleanup sql script. After upgrading to Qlik Sense November 2017 or February 2018, the administrator is unable to access the Hub and/or QMC.  This article also fixes database issues and soft deletes, which cause numerous other problems besides being unable to access the QMC or HUB after an upgrade. This script is necessary to be run if upgrading from an older version to 11.14.3 or newer.

An inspection of the System_Repository log located in C:\ProgramData\Qlik\Sense\Log\Repository\Trace shows an error message relating to being unable to remove soft deleted records.

Sample:
Fatal exception Connection must be opened.↵↓Connection must be opened.↵↓Failed to remove soft deleted records↵↓An exception was thrown while invoking the constructor 'Void .ctor()' on type 'DatabaseContext'


On Qlik Sense November 2017 or higher

ISSUE

Till June everything is working fine.
But direct upgrade from June2017 to April2018
Fails the Repository Service to update some table which violates foreign key constraint.
C:\ProgramData\Qlik\Sense\Log\Repository\Trace\QLIKSERVER1_System_Repository
Fatal exception update or delete on table "CompositeEvents" violates foreign key constraint "FK_CompositeEventTimeConstraints_CompositeEvents_ID" on table "CompositeEventTimeConstraints"↵↓Failed to execute query: 'DELETE FROM "CompositeEvents" WHERE "Deleted" = true'. Exception: update or delete on table "CompositeEvents" violates foreign key constraint


CAUSE

In November 2017 and February 2018, when the Qlik Sense Repository Service initializes, it attempts to clean up the underlying Repository Database. If there are records which have broken referential integrity then the Repository Service will fail to initialize. This is a consequence of a change in behavior in November 2017/February 2018 where the Repository no longer does soft deletes.
The script may be found here: help.qlik.com

RESOLUTION

Stop all services but the Qlik Sense Repository Database
If using a stand-alone PostgreSQL server to host Qlik Sense content, then stop all Qlik Sense Services
Take a backup of the Qlik Sense Repository Database
Sample command using cmd.exe: cd / & mkdir QSR & "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin\pg_dump.exe" -h localhost -p 4432 -U postgres -b -F t -f "c:\QSR\QSR_backup_%date:~-4,4%%date:~-10,2%%date:~-7,2%.tar" QSR
This assumes that:
Qlik Sense is installed to C:\Program Files
That the site is not using a stand-alone PostgreSQL server
Make any necessary adjustments if neither of those assumptions are true
Download the attached .sql file and place it into the same directory as pg_dump.exe
Run the following command in cmd.exe (run them one at a time and hit Enter then continue with the next one):
cd C:\"Program Files"\Qlik\Sense\Repository\PostgreSQL\9.6\bin
SET PGCLIENTENCODING=utf-8
chcp 65001
psql.exe -h localhost -p 4432 -U postgres -d QSR -e -f recurse_cleanup.sql
If Qlik Sense is installed to a non-default directory then make the necessary adjustments
Start all Qlik Sense Services
Validate that the error about Failed to remove soft deleted records is not present in the System_Repository log
If this does not resolve the issue then do contact Qlik Support for a more customized query

Changing of Hostname after installation of Qliksense

Qliksense


Changing of Hostname after installation of Qliksense



The hostname in Qlik Sense is determined by the content of host.cfg, to change the hostname, you must change the value in this file. This will also result in all certificates being invalidated. They need to be recreated. 
In a single node site this is sufficient, in a multi-node system there are further steps that will be required.

Single Node site

Qlik Sense any version 

Single Node
1) Log in as the service account
2) Change hostname in Windows as usual.
3) Restart the server as required by Windows.
4) Stop all the Qlik Sense services, except for the Qlik Sense Repository Database
5) Use Microsoft Management Console(MMC) to delete all the Qlik Sense related certificates.
6) Delete %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates
7) 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. Generate this string for the new hostname using a site such as base64encode. 
9) Open Host.cfg and replace the content with the new string
10) Finalize:
  • In Qlik Sense 3.2.5 or earlier, start all Qlik Sense services to regenerate certificates. 
  • In Qlik Sense June 2017* or later follow the instructions below to regenerate certificates:
Instead of starting the Repository Service directly, run Windows Command Prompt as Administrator.
Execute  "C:\Program Files\Qlik\Sense\Repository\Repository.exe" -bootstrap -iscentral -restorehostname 

*This is required in order to re-create local Qlik certificates in newer versions of sense, as this is due to changes in this version that introduces the floating central node concept. 

Keep in mind: The central certificate is used to encrypt password strings being used in connectors, so changing this certificate means that you will need to recreate all connectors that include password information.


Multi-Node Site



There are two possible scenarios in a multi-node environment changing the hostname for a Rim node and for a Central node. Certificates are always generated by the central node and are based on hostname so changing hostnames here is more time consuming and will require redistribution and in some cases also the deletion and readding of node information.

Changing Rim Node Hostname

  • On the Rim node:

1) Change hostname in Windows as usual.
2) Restart the server as required by Windows.
3) Stop all the Qlik Sense services
4) Use Microsoft Management Console(MMC) to delete all the Qlik Sense related certificates.
5) Delete %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates
6) For backup purposes, make a copy of %ProgramData%\Qlik\Sense\Host.cfg and rename the copy to Host.cfg.old
7) Host.cfg contains the hostname encoded in base64. Generate this string for the new hostname using a site such as base64encode. 
8) Open Host.cfg and replace the content with the new string
9) Start up Qlik Sense, when it fails to find the certificates it will enter set up mode
10) 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 readd it to do this

  • 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


Changing Central Node Certificate


All certificates used by Qlik Sense are created and signed by the central node and are based on its hostname, changing the hostname on the central node breaks this chain of trust and thus all certificates on all nodes will need to be recreated and redistributed.

  • On every rim node:

1) Stop all Qlik Sense services
2) Use Microsoft Management Console (MMC) to delete all the Qlik Sense related certificates
3) Start Qlik Sense services
4) Upon starting without certificates they will enter Setup mode, meaning they will be listening for new certificates

  • On the central node:

1) Change hostname in Windows as usual.
2) Restart the server as required by Windows.
3) Stop all the Qlik Sense services, except for the Qlik Sense Repository Database
4) Use Microsoft Management Console(MMC) to delete all the Qlik Sense related certificates.
5) Delete %ProgramData%\Qlik\Sense\Repository\Exported Certificates\.Local Certificates
6) Copy %ProgramData%\Qlik\Sense\Host.cfg to Host.cfg.old
7) Host.cfg contains the hostname encoded in base64. Generate this string for the new hostname using a site like https://www.base64decode.org/
8) Open Host.cfg and replace the content with the new string
9) Finalize:
  • In Qlik Sense 3.2.5 or earlier, start all Qlik Sense services to regenerate certificates. 
  • In Qlik Sense June 2017* or later follow the instructions below to regenerate certificates:
Instead of starting the Repository Service directly, run Windows Command Prompt as Administrator.
Execute  "C:\Program Files\Qlik\Sense\Repository\Repository.exe" -bootstrap -iscentral -restorehostname 

1)Confirm the new certificates are created and QMC is accessible
2) In the QMC, click Nodes
3) Select each rim node and click Redistribute
4) Follow the instructions displayed

Keep in mind: The central certificate is used to encrypt password strings being used in connectors, so changing this certificate means that you will need to recreate all connectors that include password information.

In addition to the above, the relevant tables in the repository database that contain the host name information are:
LocalConfigs ( Hostname column )
ServerNodeConfigurations ( Host Name )
Note: Please make sure that the above table hostname column should contain the correct server FQDN ( network host name and not the individual machine host name ) this should be exactly the hostname that is in the host.config file

Upgrading Qlik Sense

Qliksense 

Upgradation Qlik Sense From one version to another version & Impact on System of Upgradation On Live Server


Upgrade


Necessary steps before Upgradation


Before starting with the Upgradation on the Prod. Server, you must have the backups of all the QVDs, QVFs, Extensions, Widgets, .CSS file, the hub.js file and if you           have used the am Combo Chart extension, then the File(amCombo.js) with you.(you can find the am Combo.js at this location-"D:\StaticContent\Extensions\amCombo"
 [We have installed Qlik sense in the D driive, the location of the js file might differ on the basis of the Drive you have used to install Qlik Sense])

Taking backups from time to time is really important, because if your upgradation fails due to some issues, then you have an option of making the Prod server Live with the previous version only and with all the backups, that wouldn`t take much of your efforts and time.

-------------------------------------------------------------------------------------------------------------------------

Backing up of your Repository



Use this command to get the backup of Repository Database
"D:\QlikServer\Repository\PostgreSQL\9.6\bin\pg_dump.exe" -h localhost -p 4432 -U postgres -b -F t -f "D:\Backup_Certificate_Repository\QSR_backup%mydate%.tar" QSR 

Do the changes for location according to your setup.


This code can be used to get the automated backup of Qliksense Repository database backup on daily basis.

Make a batch file using TXT  File and Schedule it using Task Scheduler

//Start//

SET PGPASSWORD=Put Your Password Here
SET mydate=%DATE:/=-%_ %TIME::=-%
@echo off %mydate%
"D:\QlikServer\Repository\PostgreSQL\9.6\bin\pg_dump.exe" -h localhost -p 4432 -U postgres -b -F t -f "D:\Backup_Certificate_Repository\QSR_backup%mydate%.tar" QSR

//End//

*here PGPASSWORD is your Postgre database password
--------------------------------------------------------------------------------------------------------------------------

Backing up of your Certificates

Click On:-


--------------------------------------------------------------------------------------------------------------------------


Start with Upgradation

1 Download the Nov. Version (Patch 0) of Qlik Sense Enterprise on the Production Server.
2 Double click on installtion file to start the installation, you will see an Option on the screen to "Upgrade" the Qlik Sense Version. 
3 Click on the "Upgrade" Button, and the Upgradation would start. 
4 This might take 20-30 minutes to complete the upgradation.
5 When the Upgradation is complete, Open the Qlik Sense Hub and QMC to verify Upgradation.
6 You will notice all the QVFs in the Hub, Open your App and browse through it.
7 You will notice, that all the extensions and widgets are absent in your app.
8 Now, import all the used Extensions and Widgets one by one and check the functionality of the app time to time to note if any errors/ issues persists?
9 After all the widgets and extensions have been imported, browse through the app to see if the application is working fine?
10 If everything works out fine, then you have successfully Upgraded the Qlik Sense Version.

Noticed Changes After Upgradation


1 All the CSS changes in your application have been reverted, i.e all the CSS changes have been removed after the upgradation.

NOTE You cannot replace the new .CSS file the backup of the CSS file, because if you would compare the CSS files of the Sept. Version and the Nov Version, you would notice a lot of new changes in the Nov Version. So the advise here is to make all the CSS changes one by one Manually in the new .CSS file.

2 If you have made some changes in the hub.js file, like making the application open up in the same tab instead of a new tab everytime, then such changes would no longer exist in your hub.js file.

"Go to C:\Program Files\Qlik\Sense\Client\hub and make a backup copy of the file hub.js

Right click on notepad.exe and open as an Administrator 
(must be opened as an admin in order to same modifications; if not you will 
be asked to rename and save as a different file)

Open the original hub.js file and make the following modification
ctrl + f to find the words ""window.open"" in the line 
""openApp:function(a,b,c){var d;d=c?e.buildUrl(!0,""sense"",""app"",a,""noData"",""true""):
e.buildUrl(!0,""sense"",""app"",a),b?window.open(d):e.setUrl(d)},openItem:function(a,b)
{b?window.open(a):e.setUrl(a)""Remove ""b?window.open(d):"" and ""b?window.open(a):"" and 
save the file

The line should read ""openApp:function(a,b,c){var d;d=c?e.buildUrl
(!0,""sense"",""app"",a,""noData"",""true""):e.buildUrl(!0,""sense"",""app"",a),
e.setUrl(d)},openItem:function(a,b){e.setUrl(a)}"" 

after the modification
Restart the Sense services, clear the internet browser cache, and then test"


It is advised to make all the changes manually again. 


3 The js for the am combo extension wont work, if you have a published application and you login it through an outside authentication page. This happens, because the js script requires a header in its script, so that the authentication page could allow it to pass through it and thus could be shown in the published app.


"paths: {
        
""amcharts"": ""/header/extensions/amCombo/library/amcharts"",
        
""amcharts.serial"": ""/header/extensions/amCombo/library/serial"",
        
""amcharts.theme.dark"": ""/header/extensions/amCombo/library/dark"",
        
""amcharts.theme.black"": ""/header/extensions/amCombo/library/black"",
        ""amcharts.theme.chalk"": ""/header/extensions/amCombo/library/light"",
        ""amcharts.theme.light"": ""/header/extensions/amCombo/library/chalk"",
        //""amcharts.theme.patterns"": ""/header/extensions/amCombo/library/patterns"""


If this header is not provided in the js, then the Published App would throw an error of "Invalid Visualisation" in places of the am combo extension used and, whenever you would toggle to the sheet where this extension is used, a login pop would appear everytime.








Nprinting- (ver -16) Server Certificate Update Process

Certificate Update Process for QLIK Nprinting Import the certificate to QV Nprinting Server 1. Copy the certificate to the Server th...