Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simonaubert
Partner - Specialist II
Partner - Specialist II

Reloading task from script : authentication with saml and multi-node

Hello all,

The use case : I need to launch Tasks from the script.
What works :
1.on my dev environment, I created a certificate through https://<myserver>/saml/qmc/certificates
2. I set a certificate password and just put a localhost on the certificate name.
3. I copy pasted it from C:\ProgramData\Qlik\Sense\Repository\Exported Certificates
4. I created a connection like that :

simonaubert_0-1600091580409.png

simonaubert_1-1600091797877.png

simonaubert_2-1600091913144.png

simonaubert_4-1600092032296.png

5. I use this  script

 

 

Let vServer = 'localhost';
Let vTaskName = 'Reload task of Extension.Usage.Dashboard';

Let vURL = '"https://$(vServer):4242/qrs/task/start?name=$(vTaskName) "';

LIB CONNECT TO 'REST_local_Task_Launcher';
RestTable:
SQL SELECT
FROM JSON (wrap on) "root"
WITH CONNECTION ( URL $(vURL) );
Drop Table RestTable;

exit script;

 

 

So, okay, I somehow cheated a little but that works ! 🙂

And now I have some difficulties doing the same thing on the production environnement. First of all, it's a multi-node.

So what do I have to do with certificate? What machine name? Which certificate do I have to copy on which machine?

Best regards,

Simon

EDIT : detailed procedure on page 2

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Labels (1)
1 Solution

Accepted Solutions
simonaubert
Partner - Specialist II
Partner - Specialist II
Author

Hello all,

 

I made it to work in multi-node. Same process except I also copy the client.pfx certificate from the central node on all nodes.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision

View solution in original post

13 Replies
simonaubert
Partner - Specialist II
Partner - Specialist II
Author

Hello all,

 

I made it to work in multi-node. Same process except I also copy the client.pfx certificate from the central node on all nodes.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
mjperreault
Creator
Creator

Hi @simonaubert ,

 

Thanks so much for the response, I have followed your procedure closely but unfortunately I am getting the same error, it does not seem to make sense to me! The connector is definitely recognizing the certificate because if I try and enter the wrong password I get an error for wrong password.  Couple more questions

1. Did you export the secret key

2. Did you choose windows format

3. Did you have to restart any services

4. Which version of Qlik Sense are you on

Thanks so much,
Mark

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

This approach was documented here in qlik support documents: https://support.qlik.com/articles/000048247

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Sonja_Bauernfeind
Digital Support
Digital Support

Hello all,

The article referenced by Lech was moved to:  https://community.qlik.com/t5/Support-Knowledge-Base/How-to-setup-a-Data-Connection-to-the-QRS-API-u...

Thought I'd let you know to prevent any possible future dead-ends. 

Don't forget to Like posts and use the "Accept as Solution" button on content that answered your question! Thanks 🙂
mjperreault
Creator
Creator

Hi @Sonja_Bauernfeind  & @Lech_Miszkiewicz ,

 

Thanks so much for your responses, what is very strange is when I follow the steps from the article Lech has posted to create a GET Rest API connection to the repository I am succeeding and getting data from the repository, however when I try and makes a POST Rest API connection using the exact same certificate I am still getting the "HTTP protocol error 403 (No client certificate supplied): The server refused to fulfill the request."  

Here is my connection details.  


2021-02-15 17_48_58-Window.png

2021-02-15 17_51_34-Window.png

2021-02-15 17_51_47-Window.png

2021-02-15 17_52_08-Window.png

 

I will make a broader community post to see if anyone else has any thoughts, thanks again.

 

Mark

Damien_Villaret
Support
Support

Hi @mjperreault 

Which version of Qlik Sense are you running ? There were some issues with POST calls using certificates in older versions, such as February 2019, April 2019, June 2019.

https://community.qlik.com/t5/Support-Knowledge-Base/Qlik-Sense-REST-connector-cannot-make-POST-call...

If the issue is solved please mark the answer with Accept as Solution.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I have used different approach and never tried to run POST with URL parameter like "?name=...."

My approach you can see in attached file (have a look at subroutine "QRS_Reload_App_ByName_N_Stream"...). 

 

There are some other subs which are invalid due to fact that I was not able to use "X-HTTP-Method-Override", so please ignore them

thanks

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
mjperreault
Creator
Creator

Thanks for your rsponse @Damien_Villaret , I think this is likely the issue! I am on February 2019 and I am able to make the same POST call using postman so it definitely seems like its an issue with the REST connector, I will try the workarounds mentioned in the article as well as the alternate approach @Lech_Miszkiewicz  mentioned below.

 

Thanks again,

Mark

mjperreault
Creator
Creator

@Lech_Miszkiewicz  will give this approach a shot, thanks so much!