Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Save $300 - Register for QlikWorld (formerly Qonnections) by January 31st: Learn More
Partner
Partner

NPrinting APIs - Unable to connect for result set

Hi,

We've been using APIs from QlikView to regenerate mailing lists in Nprinting and sometimes we get an error on querying the Connection Status on Rebuilding the cache of the App:

        2018-11-04 22:30:40 0800 RestConnectionStatusTable:

        2018-11-04 22:30:40 0801  SQL SELECT

        2018-11-04 22:30:40 0802   "cacheStatus"

        2018-11-04 22:30:40 0803  FROM JSON (wrap off) "data"

        2018-11-04 22:30:40 0804  WITH CONNECTION( URL "https://XXX:4993/api/v1/connections/3ba19f0e-38c4-4913-b166-e0de716f2ea1", HTTPHEADER "cookie" "XXX")

        2018-11-04 22:30:40      Error: Unable to connect for result set

        2018-11-04 22:30:40      Unable to connect for result set

        2018-11-04 22:30:40      Execution Failed

        2018-11-04 22:30:40      Execution finished.

How can we understand what is the error in detail?

Thanks

4 Replies
Support
Support

Re: NPrinting APIs - Unable to connect for result set

Hello,

Which version of Qlik NPrinting are you using?

Have you tried using Postman with your Qlik NPrinting APIs?

There's a knowledge article that goes through how to set this up:

 
Below are the requirements for QlikView:
 
  • QlikView Desktop 11.20 SR15 or higher and 12.00 SR5 are supported.
  • QlikView Desktop 12.10 SR1 or higher is supported starting from Qlik NPrinting 17.2.2 and includes On-Demand reports.
  • QlikView Desktop Personal Edition is not supported.

Thank you,

Eva

Re: NPrinting APIs - Unable to connect for result set

hi

I am joining this conversation as I just experienced out of nowhere the same issue for few days in the row.

in my case it is:

  • Qlik Sense November 2018 Patch 1 12.44.2
  • Qlik NPrinting February 2019 SR1 Version: 19.0.4.0

So just to cut the story short - I have Rest GET and POST connections configured and working for quite long time already and this task was working ok. It was configured in line with those instructions: https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-use-Qlik-NPrinting-APIs-inside-a-Qli...

Occasionaly though it fails in exactly the same place as Francesco's  (when retrieving status of metadata generation process)

below is a part of script log from Qlik Sense (I changed in it server name to XXXX)

2019-10-03 22:30:43 1150 RestConnectionStatusTable:
2019-10-03 22:30:43 1151 SQL SELECT
2019-10-03 22:30:43 1152 "cacheStatus"
2019-10-03 22:30:43 1153 FROM
2019-10-03 22:30:43 1154 JSON (wrap off) "data"
2019-10-03 22:30:43 1155 WITH
2019-10-03 22:30:43 1156 CONNECTION( URL "https://XXXX:4993/api/v1/connections/5d7543c0-2596-4cc2-869c-8443e4803699", HTTPHEADER "cookie" "NPWEBCONSOLE_SESSION=d1c0d3d9c4e3b12ff912c25c58ff0e54e967d382-%00NPWEBCONSOLE_XSRF-TOKEN%3AQNYwmueT%2B%2FX3RmnOJ%2FIgf02KWEPwZFVs9%2Flo0BBpiUs%3D%00%00_TS%3Asession%00%00userid%3A56accf1b782d47a69fff783dac51ba0b%00%00userlogin%3A2019-10-03T22%3A29%3A16.6324356Z%00; ")
2019-10-03 22:30:43 Error: Unable to connect for result set
2019-10-03 22:30:43 Unable to connect for result set
2019-10-03 22:30:43 Execution Failed
2019-10-03 22:30:43 Execution finished.

 

So if i run exactly the same task/reload script again it will work without issues. There is nothing in Event Logs on NPrinting nor on Qlik Sense server what can indicate issue. 

@Ruggero_Piccoli & @Daniel_Jenkins - do you guys have any recommendations on this? Should I log support case for this or is it just one of the settings i should change in connections settings (timeout maybe)?

 

appreciate your inputs

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.
Partner
Partner

Re: NPrinting APIs - Unable to connect for result set

Hi,

I am experiencing the same issue/error, also totally out of the blue.
Task has been running fine for a long time and if I reload, it also runs without problems.

NPrinting June 2019 (ver. 19.19.4.0).
QlikView Server 12.10.20500.0.

Like the other posts, the script also fails when checking the status.
Difference with the other posts is that the script fails when checking the NPrinting task execution status.
The script checks every minute for the task execution status and did this 15 times without a problem, failed 16th time.
I never experienced any issues with the check every minute in this task or any other task, but I guess some sort of timeout happened this time?

Log:

2019-10-23 05:02:37 0348 sleep vTimeoutCheckInterval
2019-10-23 05:03:37 0350 TaskExecutionStatus:
2019-10-23 05:03:37 0351 SQL SELECT
2019-10-23 05:03:37 0352 "id" ,
2019-10-23 05:03:37 0353 "status"
2019-10-23 05:03:37 0354 FROM JSON (wrap off) "data" PK "__KEY_data"
2019-10-23 05:03:37 0355 WITH CONNECTION( URL "http://XXServerXX/api/v1/tasks/2bcafecc-e245-472d-bf47-34490f246d0f/executions/8d60f44d-4526-4179-a31d-1b63cf66c4b0", HTTPHEADER "cookie" "NPWEBCONSOLE_SESSION=043a2021e4ae0bd6fe64f04db27f28063760a5c2-%00userlogin%3A2019-10-23T02%3A45%3A23.6744426Z%00%00NPWEBCONSOLE_XSRF-TOKEN%3AMsHZ5KjnUrhw256xN6JpZVBnOOPR5bEUB4BhVTAq0O8%3D%00%00_TS%3Asession%00%00userid%3Ae692c16c861047759b8da98f71bf39aa%00; ")
2019-10-23 05:03:37 Error: Unable to connect for result set
2019-10-23 05:03:37 Unable to connect for result set
2019-10-23 05:03:37 Execution Failed
2019-10-23 05:03:38 Execution finished.

@Lech_Miszkiewicz  Did you ever got a fix for this or logged a support ticket? Thanks for your answer! 🙂

Re: NPrinting APIs - Unable to connect for result set

hi @Fred ,

Please see my answer to this topic here: https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Nprinting-API-Unable-to-connect-for-result-...

 

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.