Wednesday, December 28, 2011

Connection Timed out while replaying HTTPs URLs in VUGen 11

Problem statement:

The following error occurred in the replay log while replaying a script with HTTPS site recorded:
Action.c(xx): t=300293ms: Connecting to host [IP_address:]443              [MsgId: MMSG-26000]
Action.c(xx): t=312252ms: Inactive socket was closed by [server]:443, probably due to keepalive timeout                 [MsgId: MMSG-26000]
Action.c(xx): t=312252ms: Closed connection to [server].com:443 after completing 7 requests     [MsgId: MMSG-26000]
Action.c(xx): t=313596ms: Inactive socket was closed by [server]:443, probably due to keepalive timeout                 [MsgId: MMSG-26000]
Action.c(xx): t=313612ms: Closed connection to usbiuat.[server]443 after completing 6 requests     [MsgId: MMSG-26000]
Action.c(xx): Error -27796: Failed to connect to server "[URL]:443": [10060] Connection timed out                 [MsgId: MERR-27796]
Action.c(xx): t=321303ms: Closed connection to [URL]:443 after completing 0 requests         [MsgId: MMSG-26000]
Action.c(xx): Warning -26000: Empty or no response for URL="[URL]"      [MsgId: MWAR-26000]
Action.c(xx): web_submit_data("your URL") highest severity level was "ERROR", 0 body bytes, 0 header bytes                 [MsgId: MMSG-26388]
Action.c(xx): Notify: Transaction "Transaction_Name" ended with "Fail" status (Duration: 30.2647 Wasted Time: 0.0156).
Ending action Action.

Cause:
The cause of this error was due to a defect in LoadRunner 9.52. The SSL/NTLM patch did not help.

Solution:
The replay issue was resolved by upgrading from LoadRunner  9.52 to version 11and  applying critical patches 1 and 2.


Wednesday, December 21, 2011

Error -26668: Failed to open console sync file

Problem Statement:

During replay of a script in LoadRunner we see the following error:
Action.c(xxx): [Continuing after] Error -26668: Failed to open console sync file ("[SCRIPT PATH]\result1\ctrlsink.dat") for output. Internal error code (errno) was 24  [MsgId: MERR-26668]
This occurs on a web_url() function after the first iteration passed successfully.

Solution:

Increase the network buffer size parameter from default 12288 to something greater, e.g. 40960 in Run Time Settings->Preferences->Options->Network buffer size

Wednesday, December 7, 2011

How to reset the password for diagnostics server

If you have lost / forgot the default admin password for diagnostics server then you can do the following to get it fixed or reset:



    1. Stop and Close the Diagnostics server
    2. Go to "Diagnostics_Install_Path"\Server\etc
    3. Open the file .htaccess using a text editor like Notepad or Textpad
    4. Search for the admin entry
    5. Delete the password for the admin
    6. Make the Entry as shown: admin = Vc3TBN0P/ab8k,,[admin]
    7. Save the modified file
    8. Start/Open the Diagnostics server using User: admin and Password: admin

Now you should be able to login to Diagnostics properly... Enjoy...

Thursday, December 1, 2011

Errors encountered while running vusers in controller regarding illegal names in script files

While running Vusers in the Controller the user receives the following errors:
Error: "82000 One or more of the script's files have illegal names. It is possible that two files are using the same name and directory."
Error: "84805 The user files were not transferred to the local load generator"
The scripts run fine on the local host but experience the above error while trying to run on a remote machine

Resolution:

Make sure that all the scripts names and parameters are unique
1. Make sure that all the scripts' names and parameters are unique. Please note that you should not create any script or parameter with a difference case. For example, "LoadRunner" or "loadrunner" will not make any difference to the Controller.
2. Make sure that the path where the script is saved does not exceed Window's maximum path length (260 characters). If it is, try to save the script in some other location with shorter path.
3. Make sure that all the parameters referencing the same parameter file use the same case for the file name/file path when it is being added to the script. If the case for the parameter file name/file path differs, it might causes problems.
4. Make sure that the "ScriptName".prm file references the parameter in the script in correct case. If not, it might cause problems.
5. Make sure that there are no spaces in the parameter file names.  Embedded spaces will work for VuGen but not for Performance Center.
6. The file name of the parameter file itself (and the path) should be the same as the Table value in the prm file.  If TableLocation is not "Local", ensure the parameter file exists in the path specified.

Common Errors with Java Scripts in Controller / Replay

Below are some common issues / errors that are faced while replaying / running java vuser scripts in loadrunner:


"22994 : Error:Unable to create Java VM"

This error usually means that the PATH and the CLASSPATH environment variables are not set properly.
Delete ini file for Vugen:
a. Shutdown Vugen.
b. Go to "Window install directory" and look for vugen.ini. Delete the file. LoadRunner will recreate new configuration file when VuGen is launched.
c. Launch VuGen and run the script again. 



"22997 Java Vuser Compilation failed"

Make sure that LoadRunner and the Java environment are set up properly.
1. Ensure the "jdk install dir"\bin and "LoadRunner Install dir"\bin directories are in the PATH environment variable.
2. Ensure "LoadRunner Install dir"\classes, "LoadRunner Install dir"\classes\srv, and "JDK install dir"\jre\lib\rt.jar are in the CLASSPATH environment variable (preferably at the beginning of the entry).
3. Add any necessary application CLASSPATHs to the environment variable.
4. Remove potentially conflicting entries in both the PATH and CLASSPATH entries (sometimes having the Java environment set up for QTP  will conflict with the LoadRunner compilation process).
5. If you are running the script on a remote load generator, make sure that you apply the same update (1-4 ) there, and then, restart the LoadRunner agent.
6. Make sure that any classpaths specified in the Run-Time settings of the script are valid on the load generator machine as well.


"22992 Can't find Actions.class"

Make sure that there is a file named "Actions.class" within the script directory. This is the Java bytecode file generated from compiling Actions.java. If this file does not exits, there could be a compilation problem. 
If the file exits, verify the folllowing:
1. Ensure the "JDK Install dir"\bin and "LoadRunner Install dir"\bin directories are in the PATH environment variable.

2. Ensure "LoadRunner Install dir"\classes, "LoadRunner Install dir"\classes\srv, and "JDK Install dir"\jre\lib\rt.jar are in the CLASSPATH environment variable (preferably at the beginning of the entry).
3. Add any necessary application CLASSPATHs to environment variable.
4. Remove potentially conflicting entries in both the PATH and CLASSPATH entries (sometimes having the Java environment set up for QTP will conflict with the LoadRunner compilation process).
5. Make sure to restart the Controller or VuGen in order to have changes in steps 1-4 registered.
6. If the script was working and started to throw the above error for no obvious reasons, try to clean up the initilization files and reregister LoadRunner's DLL. To reregister the DLLs and recreate the configuration files:

a. Make sure all the LoadRunner applications are closed.
b. Go to "LoadRunner Install dir"\bin directory and execute register_vugen.bat.
c. Go to C:\Winnt, back up vugen.ini, then delete the file. LoadRunner will recreate new configuration files when VuGen is launched.

7. The JVM is limited to 56 KB per function. If one or more of the functions within the Actions class is too big, you will get the above error. To resolve this, break the function up into multiple functions. 






How to Run different JAVA scripts using different JDK versions on same LG


Since different JDKs are needed by the different scripts that you need to be run concurrently from Controller on a single LG you can use Terminal Services as an option.
1. Launch the LoadRunner Agent as a process.
2. Before launching the sessions and the respective agents make sure you select Start -> Programs->  LoadRunner -> Advanced settings -> Agent Configuration -> Enable Terminal Services.
3. Open a different terminal session for each JDK environment on the Load Generator machine. Log in as a different user for each session. You can set up the environment for each user to point to a different JDK.
4. On each session, launch the Agent process. This process will pick up the JDK specified in the environment variable.
5.In the Controller, connect to each session as LG:0, LG:1, LG:2, and come to a "Ready" state. Then, run each script in the session that has the respective JDK.

How to check the Transactions done by a Vuser in Analysis

The Analysis data pulls out the transaction data for all the vusers for your test run. If you are interested in getting data for a particular vuser then you can do that by:
Go to Transactions Summary Report, right-click on the graph and select filter.
On the filter page select VuserID filter and give a proper value or range of Vuser to get the appropriate data.
If you are not sure what is the VuserIDs during your test run then click on vusers button and it will list the VuserID used during your test.

How to check vuser status per script in Analysis


To check vuser status (i.e. passed/failed/stopped) per script perform the following:
1. Analyse the results in Analysis
2. Open the Vuser Summary graph.
3. Right-click on the graph, select "Set filter," then select the script name.
4. Select the Vuser End Status that you are interested in (Passed/Failed/Error/Stopped). 

Analysis gives the error "Object reference not set to an instance of an object"

Reason:
This error comes when the following files in (Analysis Install dir)\bin\dat\ are corrupted:
loader2.mdb, loader.mdf, loader.ldf

Solution:

You need to restore these files; take these files from another machine where you have installed the Analysis. Or Re-install the Analysis on your machine after a clean uninstall. 

Is Internet Explorer 9 supported by LR or PC 11.x ?

The base version of LR / PC 11.x doesn't support IE 9 by default; you need to contact customer support to get a patch on top of your base installation. It is known as Patch 3, once installed it will support IE9.

Error in loading Extension or DLLs while running LG over firewall


When running COM/DCOM scripts either from standalone Controller or from Performance Center, they fail with
Error: Extenstion lrcVba was not loaded. You are running under secure mode and this extension is not allowed
The same issue can happen for VB and JAVA user scripts.


Solution:

To be able to run the COM/DCOM scripts on an InjectorOverFireWall machine, or any other protocol type which is not allowed to run over the firewall by default, do the following:
1. Open the *.usr file, located in the script directory, using notepad and find the value for Type=.
2. On the LG machine, go to (pc install dir)\dat\mdrv\lrc_mdrv.dat file and open it in notepad
3. Add the flag "SecurityMode=on" under the relevant section like [lrc], [lrcVba], [lrcCreplay], [lrcVbareplay] etc
4. Save the changes and restart the agent process or service on the LG machine.
5. Run the test again.