Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Solving the Informatica Dilemma: On-Demand Briefing - Watch On Demand!
cancel
Showing results for 
Search instead for 
Did you mean: 
justindallasverizon
Contributor III
Contributor III

Changing Central Node Manually, 403 Error

Hello Folks,

I'm hoping to use Powershell to get my Qlik cluster to switch central nodes.  Right now, I've got the following code which works correctly.

 

$hdrs = @{}
$hdrs.Add("X-Qlik-xrfkey","12345678qwert2ui")
$url = "https://002.megacorp.com/admin/qrs/ServerNodeConfiguration/full?xrfkey=12345678qwert2ui"
$clusterNodes = Invoke-RestMethod -Uri $url -Method Get -Headers $hdrs -UseDefaultCredentials

 

 

But when I send the request to change, I get a 403.  I am sending this request with RootAdmin privileges.

 

$destinationNodeName = '003.megacorp.com'
$currentCentralNode = $clusterNodes | Where-Object { $_.isCentral -eq $true }

$destinationCentralNode = $clusterNodes | Where-Object { $_.hostName -match $destinationNodeName }
$destinationCentralNodeGuid = $destinationCentralNode.id

$changeOverPutUrl = "https://003.megacorp.com/admin/qrs/failover/tonode/${destinationCentralNodeGuid}"
Write-Host $changeOverPutUrl
$response = Invoke-RestMethod -Uri $changeOverPutUrl -Method Post -Headers $hdrs -UseDefaultCredentials

 

justindallasverizon_0-1741626105060.png

When I look into the logs, I see "InvalidConnection" along with the 403 code

justindallasverizon_0-1741632868304.png

 

What might I be doing wrong? 

 

Any help is greatly appreciated.

 

 

 

 

Labels (2)
1 Reply
mpc
Partner Ambassador
Partner Ambassador

Hi, 

In the second Powershell script, did you try to perform a GET call, as described in this doc ?

Issuing POST commands via the proxy | Qlik Sense for developers Help

Best

From Next Decision and mpc with love