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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sri_c003
Partner - Creator II
Partner - Creator II

Qlik Cluster via QRS API

We have Qlik sense deployments done via scripts (silent installs) as part of automating installation and configuration of QS servers.

As part of extending this, we are trying to set up Qlik Cluster setups via scripts. We were able to install Central and Rim nodes via silent installs.

We are trying to add the Rim node to Cluster nodes list via QRS api and are finding APIs that help with cluster configuration, but unable to find any API that allows to:

1. add Rim node

2. configure roles of Rim node.

Could someone please help us find any such API in Qlik, and how to use it, like an example or such.

We are trying to use the link to find the necessary APIs:

https://help.qlik.com/en-US/sense-developer/April2020/APIs/RepositoryServiceAPI/index.html?page=1246

 

Labels (1)
2 Solutions

Accepted Solutions
Levi_Turner
Employee
Employee

Here's a set of old code I have used in the past for this purpose which leverages Qlik-Cli: https://gist.github.com/levi-turner/6edf4860d9c7b1c8729fbaeae295a0db

 

View solution in original post

Bastien_Laugiero

Hi,

I believe this should resolve your issue https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-QRS-API-409-conflict-error-when-running-a-PU...

Hope this helps! 

Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.

View solution in original post

11 Replies
Levi_Turner
Employee
Employee

Here's a set of old code I have used in the past for this purpose which leverages Qlik-Cli: https://gist.github.com/levi-turner/6edf4860d9c7b1c8729fbaeae295a0db

 

sri_c003
Partner - Creator II
Partner - Creator II
Author

Thanks @Levi_Turner , Qlik Cli needs remote signed execution policy that may not bode well with our infosec team.

While I explore about this option and its feasibility, could you please let us know of any other way, more like on lines of silent install or qrs calls. 

sri_c003_0-1613062843305.png

 

Bastien_Laugiero

Hello,

The Qlik-Cli uses the QRS API to add and configure a rim node so yes it is doable to create your own script/application leveraging the QRS API. 

However this will not be a single line of code as there are multiple QRS API to run to get a node added and configured into Qlik Sense. The Qlik-Cli actually makes it simpler as it will run these API Calls in the background for you. 

@Levi  can add on top of that but if you are interested you can loos at the PowerShell script available in Qlik-Cli to see the different QRS API call used which should give you an idea of the workflow. 

Finally regarding the Set-ExecutionPolicy, this can be reverted back once the deployment of the node is done. You can probably automate that as well. 

Hope this helps!

Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.
sri_c003
Partner - Creator II
Partner - Creator II
Author

@Bastien_Laugiero @Levi_Turner 

Thank you both. Let me check out the CLI way.

sri_c003
Partner - Creator II
Partner - Creator II
Author

@Levi_Turner  @Bastien_Laugiero 

Sorry about the delay in my reply.

So I was finally able to get Qlik CLi on my central node. And was able to add it too... but it is failing mid way - saying it is unable to find the target system.

Here is my script.

Connect-Qlik
$password = New-QlikNode -hostname dev1727 -name dev1727 -nodePurpose Both -engineEnabled -proxyEnabled
$foo = @{__pwd="$password"}
$Username = '<domain\username>'
$Password = '<password>'
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass

Invoke-Command -ComputerName dev1727 -ScriptBlock { Invoke-WebRequest -Uri "http://localhost:4570/certificateSetup" -Method Post -Body $Using:foo } -credential $Cred$nodeid = Get-QlikNode -filter "(name eq 'dev1727')"
Invoke-QlikGet -path /qrs/servernoderegistration/start/$($nodeid.id)

Error I am facing

sri_c003_0-1614893507991.png

The system DEV1727 is reachable from Central node when i ping it.

Also, in QMC, I see the RIM node being added; but pending certs distribution.

sri_c003_1-1614893601423.png

I am not sure how to proceed further at this time.

All necessary ports are open between these two nodes since i am able to set up cluster manually.

Bastien_Laugiero

Hello!

Could you check this link? It looks like you might need to set a trusted a list of trusted hostname. 

Hope this helps!

Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.
sri_c003
Partner - Creator II
Partner - Creator II
Author

Ironically I viewed that page earlier, but didn't set up the hosts as trusted hosts.

Adding as trusted hosts got the node added and certs distributed (i assume certs have been distributed cos it now does not say certs not distributed and instead shows services status).

But towards the end of the process, instead of gracefully exiting, I see the below error:

sri_c003_0-1615304910920.png

 

sri_c003
Partner - Creator II
Partner - Creator II
Author

I ignored the error above and proceeded, and see the node being added to the list of nodes in cluster with services picked when adding it.

Thank you Levi and Bastien for the info on that. I shall accept it as solution (didn't accept for now since i added the continuation to the same post instead of making a new one).

So now i moved on to the next stage and trying to add the added node to the list of load balancing nodes under the virtual proxy.

In the body below, I highlighted in BOLD in the info about the new node that needs to be added to it.

It is coming back with success response (i am getting 409 conflict) but when i go to the nodes list, i do not see the new node added. I left the system free for like 30 minutes and still getting the same 409 conflict. Am i missing something?

sri_c003_0-1615316301750.png

Response

sri_c003_1-1615316610595.png

sri_c003_2-1615316648485.png

Bastien_Laugiero

Hi,

I believe this should resolve your issue https://community.qlik.com/t5/Knowledge-Base/Qlik-Sense-QRS-API-409-conflict-error-when-running-a-PU...

Hope this helps! 

Bastien Laugiero
If a post helps to resolve your issue, please mark the appropriate replies as CORRECT.