11 Replies Latest reply on Oct 9, 2015 9:56 AM by Hal DeVore

    TMART 4.2sp2 every other run of a monitor 'No script file specified'

    Todd Fendt

      Hi all,  TMART 4.2 sp2, Silktest 15,  Execution Servers running on Windows Server 2008 R2, Terminal Services.

      I am running a Workbench Monitor that runs a silktest monitor. (This commonly is how we run Silktest monitoring.)

      For this particular Monitor it is scheduled to run at a location with only one Execution Server every ten minutes. Every other run produces this error:

       

      Error from Truelog.png

       

      The opposite of this is that the Monitor completes successfully.

       

      I have deleted this monitor and recreated it. No change.

      I have deleted the ser file (ProgramData\BMC\PM42\AgentBase\ItemObjects.ser) on the Execution Server and rebooted. No Change.

       

      I have not seen this behavior in other Monitors that are running.

       

      Please comment or make suggestions before I pull the rest of my hair out?

       

      Thank You in advance, Todd Fendt 

        • 1. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
          Todd Fendt

          Hi,

           

          You may have to click on the actual image or horizontally scroll to be able to see the entire message as it is cutoff when displayed.

           

          Thanks, Todd

          • 2. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
            Hal DeVore

            Did you write the Monitor Workbench script that runs the Silk Test script yourself or did you use the one built into TM ART.

             

            If you make it run less often (like once every 20 minutes) does the error go away?

             

            I've not messed with Silk Test monitors in a very long time.  The symptoms sound and look like some sort of timeout problem.  Maybe the Silk Test instance isn't ending so has the script locked when the next one comes along.  After another ten minutes the first instance has timed out and been killed...

             

            Kind of speculating here.

             

            --Hal

            • 3. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
              Dan Egner

              Since it happens every other time perhaps something funny is happening at the end of the script and that causes the problem in the next run. 

               

              And after the problem the monitor is re-initialized and so it runs OK the next time.

               

              In your script do you do anything unusual, like set environment variables? Or delete files that might later be needed? Or stop processes that might later be needed?

               

              Dan Egner

              BMC Software

              • 4. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                Todd Fendt

                HI Guys,

                 

                Thanks for your replies.

                 

                I am going to paste in the BDF code below used to run the Silktest Monitor. The below code is used to run al of our Silktest Monitors. We also are using the Execution Server as a service and Terminal Services. We couldn't afford the PC hardware required if we ran as a Process ( and therefore single threaded running of Silktest monitors ).

                The Silktest Monitor starts IE, travels to a Citrix desktop webpage, logs on , then starts a Citrix app, performs a few validations, then logoffs off and closes the browser. No deleting of any files or getting environment variables values in this one. Here's the BDF code:

                //-------------------------------------------------------------------
                // SilkTest Script Template
                //-------------------------------------------------------------------
                // Author : Erich Semlak 
                // Date   : 26.02.2007
                // History:
                //-------------------------------------------------------------------
                // + improved error handling / replacement
                // + create second execution time measure for boundary issue
                //-------------------------------------------------------------------

                benchmark SilkTestBenchmarkName

                use "Kernel.bdh"
                use "StAutomation.bdh"
                use "LegalNotice.bdh"
                use "WebAPI.bdh"
                use "Utility.bdh"
                use "Event.bdh"

                // Definition of global variables
                var     
                  gsDPName : string;
                  
                // Workload Section
                dcluser 
                  user
                    SilkTestUser
                  transactions
                    TInit       : begin;
                    TSilkTest   : 1;
                    TShutdown   : end;

                dclevent

                  handler MyTransExitHandler <EVENT_RAISE_TRANS_EXIT>
                  begin
                    RestoreLegalNoticeWarning();
                    throw;   
                  end MyTransExitHandler;
                 
                  handler MyProcExitHandler <EVENT_RAISE_PROC_EXIT>
                  begin
                    RestoreLegalNoticeWarning();
                    throw;   
                  end MyProcExitHandler;
                 
                 
                // SilkTest Transactions Section
                dcltrans

                  transaction TInit
                  begin
                    initialize();
                    dpOpen(gsDPName, DP_NOWRAP);

                    SetCompleteTransaction(true);
                  end TInit;

                  transaction TSilkTest
                  var
                    lsScript                : string;
                    lsRDUser                : string;
                    lsRDPasswd              : string;
                    lnExecTimeout           : number;
                    lnConnTimeout           : number;
                    lnColorDepth            : number init ST_COLOR_16bit;
                    lbRemoteDesktopServices : boolean;

                    lsSTPFileName       : string;
                    lsTestScript        : string;
                    lsTestCase          : string;
                    lsApplication       : string;
                    lsUsername          : string;
                    lsPassword          : string;

                    lsTestData          : string;
                    lsTestDataColumns   : string;
                    lsDataColumn        : string;
                    lsDataValue         : string;
                    lbIsFirstDataColumn : boolean;
                   
                  begin
                   
                    // get attribute values   
                    AttributeGetString("Script" , lsScript);
                    lbRemoteDesktopServices := AttributeGetBoolean("Use Remote Desktop Services");
                    AttributeGetString("RDP Username" , lsRDUser);
                    AttributeGetString("RDP Password" , lsRDPasswd);   
                    lnExecTimeout := AttributeGetInt("ExecTimeout");
                    lnConnTimeout := AttributeGetInt("ConnTimeout");
                    lnColorDepth  := AttributeGetInt("ColorDepth");
                   
                    StSetExecutionTimeOut(lnExecTimeout);
                    StSetConnectionTimeOut(lnConnTimeout);
                    gnLegalNoticeTimeout := lnConnTimeout * 1000;
                       
                    AttributeGetString("Data Pool Name" , gsDPName);
                    lsSTPFileName := strReplace(gsDPName, ".csv", ".stp");
                           
                    dpSearch(gsDPName, "Location,TestScript", gsLocationName+","+lsScript);      
                         
                        lsTestScript      := dpValue(gsDPName, "TestScript");
                        lsTestCase        := dpValue(gsDPName, "TestCase");
                        lsTestDataColumns := dpValue(gsDPName, "TestDataColumns");
                       
                        Print("TestScript: "      + lsTestScript);
                        Print("TestCase: "        + lsTestCase);
                        Print("TestDataColumns: " + lsTestDataColumns);
                         
                        // Dynamically build TestData to pass into SilkTest GUI
                        lbIsFirstDataColumn := true;
                        while dpValueElement(gsDPName, "TestDataColumns", lsDataColumn) do     
                               
                          // Get user info
                          if lsDataColumn = "UserDomain" then
                            lsUsername := DpValue(gsDPName,"Username");
                            lsApplication := DpValue(gsDPName,"Application");
                            lsDataValue := "\"" + getUserDomain(lsUsername, lsApplication) + "\"";
                          elseif lsDataColumn = "Password" then
                            lsUsername := DpValue(gsDPName,"Username");
                            lsApplication := DpValue(gsDPName,"Application");
                            lsDataValue := "\"" + getSTPassword(lsUsername, lsApplication) + "\"";
                            lsPassword := getPassword(lsUsername, lsApplication);
                          else
                            lsDataValue := "\"" + DpValue(gsDPName, lsDataColumn) + "\"";         
                          end;
                         
                          if lbIsFirstDataColumn then
                            lsTestData := lsDataValue;
                          else
                            lsTestData := lsTestData + "," + lsDataValue;       
                          end;
                         
                          lbIsFirstDataColumn := false;
                        end;
                   
                        Print("TestData: " + lsTestData);
                       
                        if lbRemoteDesktopServices then
                          BackupLegalNoticeWarning();
                          StInitSession(lsRDUser, lsRDPasswd, lnColorDepth);
                          RestoreLegalNoticeWarning();
                        end;
                     
                        StLoadProject( lsSTPFileName);
                        //StSetOption(ST_OPTION_PROJECT, lsSTPFileName);   
                   
                        StExecuteTestcase(lsTestScript, lsTestCase, lsTestData, "");     
                   
                        StLogoffSession();
                          
                  end TSilkTest;

                  transaction TShutdown
                  begin
                    dpClose(gsDPName);
                  end TShutdown;

                 

                Please note: some of the code simply allows us to feed data from our datapool files to allow for many different sets of data to drive the actual Silktest Monitor, such as what customer to lookup within the AUT.

                 

                Thanks, Todd Fendt

                 

                PS. I am changing the scheduling of the Monitor to a longer interval and will see what happens.

                • 5. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                  Hal DeVore

                  I think Dan and I are mostly on the same track.  I'm sure he's right about the failure causing the monitor to end so next iteration starts cleanly.  It's possible that you'll get the same effect from scheduling iterations more than 15 minutes apart.  If the SilkPerformer script is hanging up then the stalled execution deadman timer will kill it.

                   

                  I don't have a TM ART system handy to check so this next will be a bit vague.  Hunt around in your TM ART Central directory and find a directory named something like "StandardMonitors".  In it you'll find all the "built in" Essentials like URLCheck.  One of them will be the Silk Performer script that TM ART uses by default to run Silk Test monitors.

                   

                  Compare the St* calls in that to what you're doing.  This might turn up some bit of necessary exit code.

                   

                  --Hal

                  • 6. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                    Christophe Oggeri

                    Hi Todd,

                     

                    Obviously, your variable containing the name of the script is empty when the script is running.

                     

                    Is the script is working fine when you do a "run now" test ?

                    Did you tried to use the writeln function for all your variable and see what is outputed when the script is failing ?

                     

                    Did you tried to put what you have in your Init transaction inside your main transaction instead ?

                     

                    Maybe the issue comes from the function setcompletetransaction who seems to call the end transaction, and for some reason the next executions are not entering in the begin transaction (which is the normal behavior when the end transaction is not called) then your function dpopen is not executed (btw, what is the purpose of this function, I do not find it in the help ?).

                    • 7. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                      Hal DeVore

                      Christophe might be onto something.

                       

                      The normal way that SilkPerformer scripts run under the TM ART Execution Server is:

                      1. Execute any TInit transactions
                      2. Execute any non (TInit or TShutdown) transactions once (as selected when creating the monitor
                      3. Sleep until next schedule execution
                      4. Loop back to 2

                       

                      Any TShutdown transactions will be executed if the monitor is gracefully ended.  That happens when:

                      • Monitor has a schedule that ends and last run is completed
                      • Execution Server is gracefully shutdown
                      • A replacement Monitor is received.

                       

                      I don't know the dpOpen function, that must be in one of your BDH files.  Is it possible that the resource that it opens is timing out and closing?  Or could it be getting preempted by some other script or application?

                       

                      If you move the code from your TInit and TShutdown both into TSilkTest they will get executed on every cycle and the open/close will happen for each run of the monitor.

                       

                      --Hal

                      • 8. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                        Todd Fendt

                        HI Hal ( and Christophe),

                         

                        I am studying that and also comparing my implementation of running SK monitors through BDF code.

                         

                        The dpOpen is a function in one of my BDH headers for the purpose of initializing a datapool file. For this Monitor the Datapool provides these fields: The Execution Server location name, ST TestScript name, ST TestCase name, Application Name ( used to lookup the password ( stored encrypted) for the Username, Username.

                        dpOpen initiailizes

                        dpSearch allows for searching with criteria for specifc recordsm, such as only records that have a certain location name

                        dpValue gets values from that current record.

                         

                        If the above datapoints are not provided, as you both have suggested, then the stexecutetestcase won't be happy.

                        I am adding code to the BDF to further test these data points before stexecutetestcase happens.

                         

                        The Datapool code tracks each datapool file that has been opened and also tracks what record in the datapool is in use, among other things. it also has functions to access each field from that record. If the datapool code cannot access the datapool file I would have already had errors. But I get what you two are suggesting in that if something loses it's wits and forgets what was done in the Init section then things are ruined.

                         

                        Not that it helps this situation but this same datapooling is being employed for several dozen SIlktest monitors in my environment that are not exhibiting this 'every other' trouble ever.

                         

                        As a side, I have tried scheduling the monitor with a larger interval between runs with no difference at all. The 'every other' phenomenon still happens.

                         

                        I will update as new results and findings reveal themselves.

                         

                        Thanks, Todd

                        • 9. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                          Hal DeVore

                          Todd said:

                          Not that it helps this situation but this same datapooling is being employed for several dozen SIlktest monitors in my environment that are not exhibiting this 'every other' trouble ever.


                          From the fact that you'd put that code into functions, I guessed this wasn't the only monitor using it.


                          All I can suggest is lots of "print" functions to debug this.  My next guess is that you'll find that there is some sort of collision between this monitor and something else in some manner that you've not accounted for.


                          --Hal

                          • 10. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                            Todd Fendt

                            Hi Everybody,

                             

                            Apologies for being so busy. I was finally able to debug this and discovered that this was caused by empty records in my data pooling. These empty records were responsible for sending empty fields for test case et al.

                             

                            This is what was causing my trouble. After correcting the empty records in the data pool the script is no longer exhibiting the 'every other' behavior.

                             

                            Sorry for all of the thought that went into you posts.

                             

                            Have a great day, Todd Fendt

                            • 11. Re: TMART 4.2sp2 every other run of a monitor 'No script file specified'
                              Hal DeVore

                              Glad you figured it out.  No worries about the time/effort.  Keeps the old brain cells functioning.