Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mingsum214
Partner - Contributor III
Partner - Contributor III

Qlikview Serer reload fail for qvw executing bat

I have a bat file like this to trigger an app reload.

"C:\Program Files\QlikView\qv.exe" /R "C:\QV_FILE\test_qv_01.qvw"
Exit

I add code in a new QVW file call "trigger _bat.qvw" to execute the above bat file.

Script like this:

EXECUTE cmd.exe /C "C:\QV_FILE\qv_reload_app01.bat";

exit script;

When I reload the "trigger _bat.qvw" with QV desktop, the bat is running correctly and the "C:\QV_FILE\test_qv_01.qvw" is reloaded.

However, when I place it in server and setup reload task to reload "trigger _bat.qvw" , it do not pop out any error, but it keeps reloading and reloading.

Under task log:

(6/7/2023 9:07:30 PM) Information: Opening "C:\QV_FILE\Trigger bat for app reload 01.qvw"

(6/7/2023 9:07:30 PM) Information: Allocating new QlikView Engine. Current usage count=0 of 4 (of type non-reader).

(6/7/2023 9:07:30 PM) Information: Max retries:5

(6/7/2023 9:07:30 PM) Information: Attempt:01

(6/7/2023 9:07:32 PM) Information: Opened the QlikView Engine successfully. ProcessID=16720

(6/7/2023 9:07:32 PM) Information: Allocated QlikView Engine successfully. Current usage count=1 of 4 (of type non-reader). Ticket number=3.

(6/7/2023 9:07:32 PM) Information: Loading document "C:\QV_FILE\Trigger bat for app reload 01.qvw" (0.15 Mb)

(6/7/2023 9:07:32 PM) Information: Physical FileSize=0.15 Mb. Memory Allocation Delta for this file=2.84 Mb. Available Physical Memory Before Open=5608.47 Mb. Available Physical Memory After Open=5603.32 Mb. Total Physical Memory=7999.55 Mb.

(6/7/2023 9:07:32 PM) Information: Attempted to load the document without data.

(6/7/2023 9:07:32 PM) Information: The document was loaded successfully.

(6/7/2023 9:07:32 PM) Information: Document was opened successfully

(6/7/2023 9:07:32 PM) Information: Starting reload

(6/7/2023 9:07:32 PM) Information: The Source Document is being reloaded. DocumentPath=C:\QV_FILE\Trigger bat for app reload 01.qvw

(6/7/2023 9:07:33 PM) Information: Reloading.

(6/7/2023 9:07:34 PM) Information: Reloading..

(6/7/2023 9:07:35 PM) Information: Reloading...

(6/7/2023 9:07:36 PM) Information: Reloading....

(6/7/2023 9:07:37 PM) Information: Reloading.....

(6/7/2023 9:07:38 PM) Information: Reloading......

(6/7/2023 9:07:39 PM) Information: Reloading.......

(6/7/2023 9:07:40 PM) Information: Reloading........

(6/7/2023 9:07:41 PM) Information: Reloading.........

(6/7/2023 9:07:42 PM) Information: Reloading..........

(6/7/2023 9:07:43 PM) Information: Slow down logging. Log every <2> seconds.

(6/7/2023 9:07:43 PM) Information: Reloading

(6/7/2023 9:07:45 PM) Information: Reloading.

(6/7/2023 9:07:47 PM) Information: Reloading..

(6/7/2023 9:07:49 PM) Information: Reloading...

(6/7/2023 9:07:51 PM) Information: Reloading....

(6/7/2023 9:07:53 PM) Information: Reloading.....

(6/7/2023 9:07:55 PM) Information: Reloading......

(6/7/2023 9:07:57 PM) Information: Reloading.......

(6/7/2023 9:07:59 PM) Information: Reloading........

(6/7/2023 9:08:01 PM) Information: Reloading.........

(6/7/2023 9:08:03 PM) Information: Reloading..........

(6/7/2023 9:08:05 PM) Information: Slow down logging. Log every <10> seconds.

The only thing I can do is manually abort the task.

 

I understand there are standard reload function in QMC for document reload. However, as I am creating a chained task including call to NP API (to replace the function of reload task in old NP16), so under my scenario, I must use bat approach to trigger reload of QVW.

Labels (2)
4 Replies
marcus_sommer

There are a lot of possible issues, for example:

  • has the qmc user the appropriate access rights to the bat ?
  • has the qmc user a valid QlikView licence ?
  • also by other called tools like NP, Excel and so on - exists valid licences ?
  • is any section access applied ?
  • any OnOpen actions/macros ?
  • are the user- and document security-properties properly set 
  • is the AllowExecuteCommand setting applied within the settings.ini
  • probably some more reasons ...

At first try to execute with the qmc-user on the server the batch manually which should exclude most of the access and licence stuff and also any possible popup-queries asking to allow or config anything. Helpful may also the following links:

How to schedule the Batch file in QMC - Qlik Community - 807380

Solved: QDS is overwriting the Allowexecute Command in win... - Qlik Community - 1434705

 

mingsum214
Partner - Contributor III
Partner - Contributor III
Author

Access right should be fine as the account using is administrator account for AD.

The app to reload is simple load inline 4 lines only without any secion access

AllowExecuteCommand =1 included in setting.ini

The task started running in QMC but the script cannot end (keep reloading) so most possible cause related to access right / license can be excluded. 

marcus_sommer

Just to clear it - the batch is starting and performing the included actions but not finishing properly and therefore the qmc-task is waiting for any (error/success) response or the batch is starting but not executing anything or the batch didn't start?

At first I suggest to check the information + links from above again and ensuring that the user + document properties are properly set. This might be done by opening the qvw with the EXECUTE directly with the qmc-user in the desktop client and performing the reload.

If the above worked but not triggered per qmc-task check again that AllowExecuteCommand is set properly and within the right settings.ini - this means not the "normal" settings.ini within the QlikView server folder else the one within System32.

Further helpful would be to log the batch-results which could be reached by adding a >> Path/Filename.log to execute-statement and if the batch itself is starting some similar logic within the batch-routine and/or within the called tools. Finding the breaking point is quite near to finding the cause. 

NadiaB
Support
Support

Hi @mingsum214 

By any chance were the necessary configurations completed on the Server for this to work properly ?

https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptR...

Also make sure that there are no restrictions , security settings on the server that might prevent some users for executing commands. 

Hope it helps. 

Don't forget to mark as "Solution Accepted" the comment that resolves the question/issue. #ngm