Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Manually Failover the Central Node

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_Delaney
Support
Support

Manually Failover the Central Node

Last Update:

Apr 22, 2021 4:19:22 AM

Updated By:

Sonja_Bauernfeind

Created date:

Nov 28, 2018 6:37:39 AM

Failover in Qlik Sense normally occurs automatically after the current central node has been down for the failover timeout (default 10 minutes).

This can also be done manually using the Qlik Sense APIs. 

If you decide that you want to move the central node to another node in your site, you can manually migrate it using the following REST API calls:

  • Get /qrs/serverNodeConfiguration to get a list of server GUIDs.
  • Do an empty POST to /qrs/failover/tonode/{serverNodeConfigurationID} to retrieve the ID of the node you want to migrate to.

For more information about Failover, see Configuring failover for central node resiliency 

 

Environment:

 

PowerShell samples:

 

Requirements:

  • These must be run on one of the nodes directly logged in as the service account (or an account that has access to the QlikClient certificate and its private key).
  • The X-Qlik-User header value must be updated by a user name that is a RootAdmin in Qlik Sense.

 

Get /qrs/serverNodeConfiguration

Request :

$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$url = "https://qlikserver1.domain.local:4242/qrs/serverNodeConfiguration?xrfkey=12345678qwertyui"
Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs -Certificate $cert

Response:

id                : 2bd6ad22-6f02-453d-bdf3-1045f0cc3757
name              : Central
hostName          : qlikserver1.domain.local
temporaryfilepath : C:\Users\qvservice\AppData\Local\Temp\
roles             : {@{id=8ea30475-1170-4d91-8138-6167677bd038; definition=0; privileges=}, @{id=3853567e-0bbf-40d5-986c-8be7e0bf3581;
                     definition=1; privileges=}, @{id=3680e3b5-949d-4efc-b62a-d8c5033c4b0b; definition=2; privileges=}, @{id=b51a2b42-
                    4a03-49b1-b290-42bec3c6ba0b; definition=3; privileges=}...}
serviceCluster    : @{id=37446216-256c-4edc-8b55-77fedfd6e6a5; name=ServiceCluster; privileges=}
privileges        : 

id                : 391a518c-c2f3-4984-9060-0d710636b909
name              : Rim01
hostName          : qlikserver2.domain.local
temporaryfilepath : 
roles             : {}
serviceCluster    : @{id=37446216-256c-4edc-8b55-77fedfd6e6a5; name=ServiceCluster; privileges=}
privileges        :

 

POST /qrs/failover/tonode/{serverNodeConfigurationID}

Request:

$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwertyui")
$hdrs.Add("X-Qlik-User","UserDirectory=DOMAIN;UserId=Administrator")
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
$url = "https://qlikserver1.domain.local:4242/qrs/failover/tonode/391a518c-c2f3-4984-9060-0d710636b909?xrfkey=12345678qwertyui"
Invoke-RestMethod -Uri $url -Method Post -Headers $hdrs -Certificate $cert

If no error is returned, it means the API call succeeded.

 

Labels (1)
Contributors
Version history
Last update:
‎2021-04-22 04:19 AM
Updated by: