Monday, 10 March 2014

LR Script runs fine on VuGen, once uploaded to BAC it randomly fails.

Problem detail:  

LR Script runs fine on VuGen, once uploaded to BAC it randomly fails.

Hi, we have an LR script that it has been tweaked in order to avoid an Issue that happens once the BPMs runs the script, but we are still having the same results, once tested manually the script it passes without issues.

Problem Solution:   I atached a file called "Log Archive & debug script on" to the FTP. This is a small utility that helps us collect output from various runs of a script in BPM. As the script fails randomly, we need to collect several output files to compare the times when the script fails and when it doesn't. To use this utility please follow the next steps in the BPM server:

- Unzip the file
- Create the folder C:\TopazAgentArchive
- Navigate to the Script folder in the BPM workspace
+ Navigate to the workspace folder (its location can be seen on the BPM main page)
+ Navigate to agent1\siteX (probably site1 if BPM is integrated with only one BSM)
+ Find the folder that starts with the name of the script you're interested in and drill down into it
+ Drill down into the next 2 folders that show up
- Edit the default.cfg file (NOT the default.cfg.bak file)
+ Set LogFileWrite to "1"
+ Under the [Log] section, set all numeric values to "1", and the LogOptions parameter to "LogExtended"
+ Save the file
- Make sure the script is active on BAC
- Identify the path to the output.txt file of the script you are interested in:
+ Navigate folder mentioned before
+ Go into the "res" folder, and inside you should see the output.txt file
+ Take note of this path
- Take note of the frequency in which the script is running and convert it to seconds
- Open a cmd window and navigate to the folder in which you unzipped the first file
- Run the logarchive.vbs using the frequency and path to the output.txt file as parameters
+ e.g. logarchive.vbs 300 "%topaz_agent_home%\workspace\agent1\site1\14\google_time_3\res\output.txt"
- This process will be acting in the background as "wscript.exe"
- Monitor the script and let it run for several times, making sure it includes various failed and successful runs
- Zip up the contents of the C:\TopazAgentArchive folder and upload it to the case along with information on the times in which the script failed
- If you want, you can kill the wscript.exe process so that no more archiving is done