top of page

Start Qlik Sense Services

Backup, Upgrade, and Recover Qlik Sense

Overview

In this lesson, you will learn how to write a script to start Qlik Sense services in the right order. Here's the final version of the script that we will be creating.



Starting Qlik Sense services is slightly more complicated than stopping the services. It’s more complicated because it includes logic to figure out which service you have that operates PostgreSQL server. For context, Qlik Sense may have either a standalone or bundled installation of PostgreSQL server. Depending on which installation type of PostgreSQL you have running along with your Qlik Sense server, you’ll have different services operating PostgreSQL. The script will need to know which service to start. There’s an if  statement within the script that we will build in this lesson that will check if a service with a name that starts with postgresql  exists and start it if it does. Otherwise, the script will start the service named QlikSenseRepositoryDatabase .

Proper Starting Order of Services

Just like with stopping Qlik Sense services, we will need to start the services in appropriate order, which is:

  1. Qlik Sense Repository Database

  2. Qlik Sense Logging Service (if available)

  3. Qlik Sense Service Dispatcher

    1. Wait for about 5-10 seconds before proceeding.

    2. Qlik Sense Service Dispatcher has a list of microservices that it needs to boot up before the rest of the services will start running.

      1. Recommendation is to pause for few seconds to ensure that service dispatcher had time to start all of the microservices before proceeding to start the Qlik Sense Repository Service.

  4. Qlik Sense Repository Service

  5. Qlik Sense Engine Service

  6. Qlik Sense Printing Service

  7. Qlik Sense Proxy Service

  8. Qlik Sense Scheduler Service

Just as in the previous lesson, if you’re following along and creating the script from scratch, you will need a file where the script will live. The steps to create a script file are always the same and are mentioned in the Stop Qlik Sense Services lesson if you will need to reference them.

Let’s get started and write script to start all of Qlik Sense services!

20

STEPS

7

SCREENSHOTS

MED

COMPLEXITY

01. Create Script

In this first section, we’ll go through the script and create it line-by-line to get a better sense for how the script is built and what it is doing.

Step 01.

Create hashtable to hold common Start-Service  command parameters.

Step 02.

Add  try-catch  block to hold commands for starting services and commands to run if the script encounters an error.

Step 03.

Inside of try  block, add this Write-Output  command to communicate that script is starting Qlik Sense services.

Step 04.

Still inside of try  block, below Write-Output  command, add $postgreSQLService  variable that will get details of PostgreSQL service if it exists.

Step 05.

Add an if  statement to start appropriate repository database service based on contents of $postgreSQLService  variable.

Step 06.

Next, add  Start-Service  command to start Qlik Logging Service if it is used on your Qlik Sense server.

Step 07.

Add  Start-Service  command to start Qlik Sense Service Dispatcher service.

Step 08.

Add  Write-Output  command to communicate that we will need to wait for microservices of Service Dispatcher to start before proceeding.

Step 09.

Add  Start-Sleep  command to pause script for few seconds before proceeding to start the remaining services.

Step 10.

Add  Start-Service  command to start Qlik Sense Repository Service.

Step 11.

Add  Start-Service  command to start the remaining Qlik Sense services.

Step 12.

Add  Write-Output  command to confirm all services have started successfully.

Step 13.

In catch  block, add the following to Write-Error  commands to communicate details on what went wrong if any of the services will fail to start as well as exit  command to stop script from running when any of the services fail to start.


02. Complete Script & Script Comments

Here’s the complete script to start Qlik Sense services, along with comments. Script that’s attached to this lesson in Overview section contains this script including the comments to help you remember what each command is doing.


03. Running the Script

Now that you have your script to start Qlik Sense services ready, make sure to save it and let’s try running it. Ideally, to fully test the script you would have Qlik Sense services stopped, run the script, and confirm that it does start the services, but that’s not necessarily a hard requirement.

If you are not in a position to take down one of your Qlik Sense servers to test this script, you can run it on a server that is up and running. The Start-Service  command doesn’t impact running services. If a service is running the script will simply report back that the service is already running, like this:

The important thing to look for is that you don’t get any errors when trying to execute the script. If you don’t, then you’re all set!

Step 01.

Launch PowerShell as an Administrator.

Step 02.

Click the Yes button in the User Account Control window.

Step 03.

Use the Set-Location  command to navigate to the folder where you saved the script file.

Step 04.

Type .\  followed by the name of the file that contains the script to start Qlik Sense services.

Step 05.

Hit the Enter key on your keyboard to run the script and start all Qlik Sense services including appropriate repository database service.

Step 06.

Wait for the script to finish running.

Step 07.

Launch the Services app to confirm that all Qlik Sense services have been started.


Guide

Summary

All Set!

With both scripts to stop and start Qlik Sense services complete, you now have a way to automatically stop and start your Qlik Sense server. We have only four more scripts to go to have all of the backup steps recorded in PowerShell scripts and ready to be implemented to automate backup of your Qlik Sense server.

Let’s continue and build a script to backup certificates that your Qlik Sense server is using. That’s covered in the next lesson. I’ll see you there!

Understanding PowerShell Execution Policies

HOWDASH LESSON

Understand the different PowerShell execution policies, how they affect script execution, and what you need to do to safely run scripts on your Qlik Sense server.

Qlik Sense Services

QLIK DOCUMENTATION

Qlik's documentation of available Qlik Sense services, including the microservices of Qlik Sense Service Dispatcher.

Stop Qlik Sense Services

HOWDASH LESSON

Begin automating Qlik Sense backups by writing a script to stop services in the correct order using a straightforward PowerShell command.

Deprecation of Centralized Logging in Qlik Sense Enterprise on Windows

QLIK SUPPORT ARTICLE

Qlik support article detailing decommission of centralized logging and Qlik Logging Service.

References

Up Next

Backup Certificates

Copyright © 2023 howdash LLC

Guides

Enroll

01. Backup Automation

Introduction to Backups

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

Backup Automation Map

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

Stop Qlik Sense Services

01. Backup Automation

Start Qlik Sense Services

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

01. Backup Automation

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

02. Upgrade

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

03. Recover

04. Bonus

bottom of page