Escolar Documentos
Profissional Documentos
Cultura Documentos
If you choose "Manually log in to the Load Generator ", the LoadRunner agent will be run as a process
named magentproc.exe. This means you need to start the LoadRunner agent manually each time you
reboot the PC/server or you need to put the LoadRunner agent process into a windows startup group.
Some vUser types will only run if the agent is running as a service (GUI, SAP, Citrix etc.). This is
because they need to run in a user context.
After installation, to switch from running the LoadRunner agent as a service to running as a
process:
magentservice.exe -remove
Add this shortcut to the startup folder - "C:\Program Files
(x86)\HP\LoadRunner\LAUNCH_SERVICE\bin\magentproc.exe"
After installation, to switch from running the LoadRunner agent as a process to running as a
service:
Remove the LoadRunner Agent Process from the Startup folder
magentservice.exe -install
N.B. You need admin rights to do this. The magentservice.exe file is in the C:\Program Files
(x86)\HP\LoadRunner\bin or C:\Program Files\HP\LoadRunner\bin folder.
• Error -29989: Process "lr_bridge.exe" was not created on remote host , reason -
communication error.
Resolution:
Different problems can cause the above error. Some of the things you can verify include:
1. Make sure that you apply the same LoadRunner version and Service Pack on the
Controller and Load Generator machines.
2. Make sure that you can ping the Controller and host machine bidirectionally. You may
need to add the IP address and machine name on the host file:
a. Go to the host machine.
b. Navigate to C:\WINNT\system32\drivers\etc\.
c. Open the hosts file in a word editor.
d. At the end of the file, add another line with the IP address and machine name of
the Controller machine.
Example:
111.111.111.111 MI_Controller
e. Repeat steps a - d for all the host machines.
f. Repeat steps a - d for the Controller machine, but adding the IP and machine name
of the hosts machines.
3. Make sure that the LoadRunner Agent is running either as a process or a service on the
remote host machine.
4. Make sure the Controller and host are connected to the network. In some networks, the
Microsoft LOOP back IP address 10.10.10.10 is used when a computer is not connected to
the network. As a result, the Controller will not be able to detect the host machine. You
will need to stop the loop back service, connect to the network, and make sure that the
machine has a valid IP address.
5. If there are multiple network cards in the machines. Configure which NIC to be used
by the process for communication. See below for some info…
==================================
Multiple NIC can cause communication problems between the Controller and the host
In general, having multiple NICs in a machine could cause a problem with the Controller-
Load Generator connectivity.
The reason is that the communication may not always be tagged with the correct
interface when sending a reply to a request from the Controller. If a message is sent out
from one NIC to a host machine, but that host knows the Controller by the other, then
that message will be considered to have come from a different Controller and ignored as
a host can only serve one Controller at a time. Likewise, messages sent from a host
machine to the Controller on an NIC other than the one the Controller knows, will not be
marked as comming from the correct host. This may cause the Controller to think the
host is not responding. In cases like this, the communication gets "lost" and will result in
time-out errors or similar. Removing extra interfaces resolves the problem.
Other possible solutions involve always using the "primary" interface, which is listed
under Network and Dial-Up Connections -> Advanced -> Advanced Settings -> Adapters
and Bindings in Windows 2000. This dialog allows you to reorder the network interfaces to
change their priority. Always reference the top most adapter when connecting with the
LoadRunner Controller.
============================
6. It might as well be possible that some network environment issue might be the cause
and the network monitor can be used to diagnose the problem. Make sure that you are
using the latest driver and firmware for your network cards and routers. Also try to force
the network card to use 100Mbs/Full Duplex instead of the 'Detect automatically the best
speed settings'. In case of miscommunication with the router or other network device the
automatic settings could be set in an inappropriate way and have huge consecuencies on
the network performances.
You may also get this error during replay if LoadRunner agent of the host machine is
connecting back to the controller using a port that is already bound. By default, this is a
dynamic port and LoadRunner agent will automatically try a different port.
• Error -29987: Process "traceroute_server.exe was not created..." when connecting to a remote
host
Resolution:
Add the host name and IP address to the Hosts file
Verify that you are able to ping back and forth between the Controller and the Load
Generator machines using both host names as well as IP addresses. If the ping in any one
case fails:
1. Add the host name and IP address of Load Generator to the Hosts file on the Controller.
2. Add the host name and IP address of the Controller to the Hosts file on the Load
Generator.
Note:
The Hosts file is usually under C:\Winnt\system32\driver\etc.
Solution:
Immediate resolution:
If you are sure that the test is complete and stopping the vuser forcefully won't affect your results
then safest way is to do a Stop Now. In case that button is disabled then disconnect the Load
Injector from the scenario. This will make the user to error-out. Re-connect the LG and re-collate
the test results (in case it didn't collate properly).
There are 2 ways to change this value; one is to change the config file or using a function in your
script.
Next thing you need to do is to restart the controller machine and register the controller dlls; this
can be done by running the batch file "register_controller.bat"
placed at: "LoadRunner Install Dir\bin"
Log-off and re-login to the machine.
This case can get worsen if you are using CITRIX protocol and you manually tried to stop a vuser
who was performing the below two functions at that time:
"ctrx_sync_on_bitmap_change" and "ctrx_sync_on_bitmap"
In case of you have large number of Vusers in your scenario then mention a limit on number of
vusers that can stopped at given time also how you stop them. The setting for ramp-down limit is
given in the LG properties:
• Go to "Run-Time Quota" tab of LG details page and select the check-box for limiting the
number of vusers that can be stopped and provide appropriate value in it.
****************************************
Installation and initial configuration
****************************************
MI Listener
Monitor Over Firewall component
To perform initial configuration of your over-firewall system:
1 Configure your system according to TCP or HTTPS.
2 Modify your firewall settings to enable communication between the
machines on either side of the firewall.
3 Configure the MI Listener.
1 Open incoming HTTPS service for port 443. The port settings are set by your
system administrator.
2 Stop the LoadRunner agent on the MI Listener machine by right-clicking its
icon in the system tray and selecting Close from the popup menu.
3 Run MI Listener Configuration from
Start > Programs > LoadRunner > Advanced Settings, or run \launch_service\bin\MILsnConfig.exe.
4 Set each option as described in the following table:
**********************************
Running Vusers over a firewall
**********************************
1 Stop the LoadRunner agent by right-clicking its icon in the system tray and
selecting Close.
2 Run Agent Configuration from Start > Programs > LoadRunner > Advanced
Settings, or run \launch_service\bin\AgentConfig.exe.
3 Select the Enable Firewall Agent check box, and then click Settings.
The Agent Configuration dialog box opens.
3 Select the Load Generator, and click Details to display the Load Generator
Information.
4 In the Security tab, enter the MI Listener machine's name in the MI Listener
field. This is the same name that you entered in the MI Listener Name
setting of the Agent Configuration dialog box. In this example, the MI
Listener is bunji.
5 In the Firewall Settings section, select one of the following options:
➤ Enable running Vusers over Firewall. To run Vusers over the firewall.
➤ Enable Monitoring over Firewall. To monitor Vusers over the firewall.
6 Click OK to return to the Load Generators dialog box.
7 Select the load generator and click Connect.
This will do all the setup required to run your test over the firewall..
How to display the total number of Vusers in the scenario instead of just the
running Vusers
Displaying the total number of Vusers in the scenario instead of just the running
Vusers
There are two files that need modifications.
Login to the Controller machine with a local administrator account. Using domain account may cause
unexpected behaviors.
Make Sure that the Temp directory is outside the User’s default Temp directory.
To free up memory:
• Close any unnecessary processes running on the machine, and try running the scenario again.
• Restart your computer.
• If the problem persists, reduce the number of virtual users that you are running on the same machine.
To boost performance, and allow more Virtual Users to run on the load generator machine:
•On Windows 2000 machines, select Start -> Settings -> Control Panel -> System -> Advanced ->
Performance Options, and select the Background Services option.
On Windows NT machines, select Start -> Settings -> Control Panel -> System Properties >
Application Performance. Set Performance boost to "None."
Check if the size of the output.mdb file in the results folder is more than 2 GB
If the output.mdb file becomes greater than 2GB during a load test, Controller is unable to write into it
anymore and cause a crash.
Sometimes, DLLs can become unregistered or the registry can become corrupted to a point where a
program's DLLs cannot be found. The purpose of batch files is to reregister them into the system's
registry so that the programs can locate them. Use the following steps to do this:
Sometimes, the initialization files can become corrupted (e.g. after a crashed). You will have problem
in launching or using the Controller after that. Use the following steps to do delete the initialization file
so that a new copy will be created:
1. Shut the Controller.
2. Navigate to the C:\Winnt ( or C:\Windows for Windows XP machine )
3. Delete all files that begin with wlrun*. For example,
wlrun.ini, wlrun5.ini, wlrun7.dft, wlrun7.hst, wlrun7.ini
Unlike the earlier window’s versions, Window 2000 and Window XP have the default environment set
to c:\Document and Settings\\Local Settings\Temp instead of c:\Windows\temp. This long path with a
space can cause several problems on LoadRunner. To resolve the issue, change to a directory without
empty spaces
Reboot
When programs crash, they leave the system in an unstable state. This can cause many other problems
that seem to have no apparent reason for happening or has not happened before. When the system is
rebooted, it resets the system into a more stable state. This should be done after any program crashes.
Verify the information in the event viewer
Sometimes, if a program crashes, it does not give any clues for what had happened. By using the
Windows event viewer, it may be possible to find some clue as to what happened when the crash
occurred. The event viewer can be launched from Start -> Programs -> Administrative Tools -> Event
Viewer.
To find out whether hooked DLLs are possibly causing a problem, you can use a third party utility call
"Process Explorer." This utility has the ability to view the DLLs loaded by an application. It can be
downloaded free of charge from the following link:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
This can be used to see if LoadRunner loaded any other program's DLLs. Use the following steps to do
this:
1. Unzip the .zip file, which was downloaded from the above URL, into a directory where you wish to
install Process Explorer.
2. Start the Controller.
3. Run the Process Explorer (procexp.exe) from the directory into which you unzipped it (step a).
4. Select wlrun.exe (Controller) from the top section of Process Explorer.
5. The bottom section should be displaying a list of DLLs. If it is showing handles for the application,
go to the "View" menu and select "DLLs."
6. Search through the list to see if any other program's DLLs are loaded. Normally, only DLLs from the
\bin directory and standard Microsoft directories are loaded. For example, if you see wbhook32.dll
(McAfee VirusScan hooking DLL) loaded by LoadRunner, then you would want to shut down the anti-
virus software.
Note:
In order to get all the other options that go with the command, run mmdrv.exe from the command
prompt without any options.
How to specify the number of iterations when executing a VuGen script from the
command line
Solution:
How to execute Analysis with a .lrr or .lra file from command prompt
Solution:
NOTE: templatename should only contain the name of the template to be used. The full path is hard
coded in a configuration file.
The result collation process fails, is it possible to recover the result data?
Solution:
Try the Collate option (Controller -> Results -> Collate Results)
First, try the Collate option: Controller -> Results -> Collate Results. If this fails, then,
1. On the controller machine, go to Result -> Results setting to verify the result location.
2. Navigate to the result directory on the controller.
3. Locate the file named remote_results.txt and open it in any word editor
4. On remote_results.txt, you will see the location of the .eve file on remote host. For example
MyHost=c:\temp\brr1\netdir\test\myhost_1.eve
5. Go to that specific host, and copy of the .eve file to the controller machine's result directory.
6. Open the Result file ( .lrr) in Analysis .
If the scenario crashed, or ended prematuerly then set "FullData=1" in the lrr file of the result folder:
1. Open the Result file ( .lrr) in notepad
2. Search for the [Data Collection] section
3. Create/modify the value or FullData to 1
Example:
[Data Collection]
FullData=1
This will help in cases that the result files ( *.eve) contains useful data but the Controller did not
manage to write to the lrr that it has the data. FullData will be zero in this case. Setting it to 1 will
enable you to view what data was saved.
If the result still failed to come up, it is very likely that the _t_rep.eve file in the controller is not
completely generated. In order to save what can be saved, run the scenario again, for a short interval(5
mins) saving the results in a folder different than the old results folder. The _t_rep.eve file and the .lrr
file in the new result directory need to be edited. In the _t_rep.eve file there is a line (first one) which
maybe something like this:
[Scenario]
Start_time=1018300521
Example:
[Graph Definitions]
AdditionalGroupBy=Error Message
Error: "-26668: Could not update controller sync file" during a load test
Diagnosis:
When running a script under the Controller and "Snapshot on error" is selected or when running in
VuGen and the Run-Time Browser is opened, replay needs to write a "sync" file for the application
(Vugen/Controller). The file should be called "ctrlsink.dat" and placed in the scenario result directory.
The error occurs when the opening of the sync file using fopen(filename, "w") fails.
Solution:
Verify the disk space and permissions
1. Verify if there is enough disk space is available. (Check the environment variable "temp" location,
better to have it other than the default user temp location like a temp folder on D-drive or C-drive)
2. Verify if the user has enough permissions to open a file in the specified directory.
3. If specified directory is on a remote machine, check if there was a network/remote machine failure
Note: If you are using LR8.0 or 8.1 make sure you have installed all your feature packs or patches.
You must me thinking whether there is any function in LR or not... well there is a function to check
exactly the same. The code snippet is mentioned below:
********************
int downloadsize;
web_submit_data(".....");
downloadsize= web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE) ;
*************************
Create the capture file
*************************
You can obtain a capture file using the command line utility or any existing
capture tool.
There is a utility in Vugen's bin directory called as "lrtcpdump.exe"which can be used to create the
network traffic capture file.
To create a capture file on a Windows platform:
1 Choose Start > Run, type cmd and click OK to open a command window.
2 Drag in or enter the full path of the lrtcpdump.exe program located in the
product’s bin directory.
3 Provide a file name for the capture file using the following syntax:
lrtcpdump -f
4 lrtcpdump prompts you to select a network card. If there are multiple
interface cards, it lists all of them. Type in the number of the interface card
(1, 2, 3 etc.) and click Enter.
5 Perform typical actions within your application.
6 Return to the command window and click Enter to end the capture session.
********************************************************
Use the analyze traffice option to generate the script.
********************************************************
1 Choose File > New and click New Single Protocol Script in the left pane.
2 Select the Web Services protocol and click OK.
3 Click the Analyze Traffic button or choose Vuser > Analyze Traffic. The
wizard opens.
4 Add the WSDL file location/URL and select next (optional)
5 On the next page provide the capture file information and click Finish
This will generate your basic web-services script for the action(s) performed. Then you can do your
customization (parametrization and correlation) to the script.
Note: Please make sure that while making the capture file, all other TCP application(s) are closed. Only
the application under test should be opened.
Error: "failed to create agent channel " during Citrix recording with Citrix
During Citrix Recording or Replay with Citrix Client 10, the user encounters the following error:
"failed to create agent channel".
Solution:
**********************
"VirtualChannels"=""
"VirtualChannels"=""
************************************
3. Change: EnableInUi=1
c) Install Java on controller and update the \dat\monitors\WebLogicMon.ini to point to installed java
JVM="C:\Program Files\Java\j2re1.4.2_18\bin\javaw.exe"
JavaVersion=1.4.2_18
Then restart your controller and add the measurements to your weblogic graph.
If you are not able to add the machine and getting a host can't be found error, then do the following
steps:
********************************************************
Make sure that the host name and IP can be resolved:
If you have problem on getting the expected information, things you can try includes:
After the above changes, try to add the WebLogic monitor again. Please note that you may need to kill
the javaw.exe process before adding the monitor. To do so
1. Bring up the Task Manager ( Cntrl-Alt-Delete -> Task manager )
2. Switch to the 'Process' tab.
3. Search for javaw.exe and end the process.
********************************************************
Note: Please note that Weblogic (JMX) monitoring can only be used till weblogic version 9.X. For
higher version you need to install sitescope and get the data.
Solution
Troubleshooting vbascriptext.dll error
1. Make sure that VBA is installed properly :
a. Install the VBA drivers by going to Start -> Programs -> LoadRunner -> Tools -> VBA Setup.
b. Complete the install and reboot the machine.
c. Run your script again.
Note: If you are using older versions of LoadRunner ( before LoadRunner7.5) please contact
Customer Support for the VBA setup install.
2. VBA compiler has a limitation of up to 39 characters of the file name. Since Mercury adds additional
characters to the script name, it must be 21 characters or less.
3. If the problem persist, try to run your script though the VBA IDE once. To do so:
a. Bring up your script in VuGen.
b. Go to Vuser -> Run-time settings -> VBA.
c. Enable "Debug script through VBA IDE (VuGen only)."
d. When you run the script, VB IDE should be launched. If not, it means VBA driver was not
installed (properly). You might need to reinstall your VBA setup.
4. If step (3) brings you to the line 'Dim objectHelper As New LoadRunnerVbs.ObjectFactory', it is an
indication that LoadRunner helper object is not registered. You can manually register lrapihlpr.dll and
lrapivbs.dll under the \bin directory. After that, "LoadRunner Protocol Replay Helper" will be checked
by default in the Run-Time Settings -> VBA option.
5. Make sure that you are using the VB function correctly. For example, LoadRunner function should
be referenced as 'lr.' instead of 'lr_'
Example: lr.save_string "param_value", "param_name"
6.Check the security-properties of the \bin\vba6_setup\vba6.msi file and make sure 'Everyone' have full
permissions on it. Uninstall the VB Addin by right-clicking on vba6.msi file and selecting 'uninstall'
and re-install the Add-in.
Note:
1. You might need to reboot your machine after making these changes.
2. For running script on a remote machine, please make sure that you installed the components for the
application on all load generator machines.
Solution:
There are 2 ways to change this value; one is to change the config file or using a function in your script.
The simple way is to check the size of the download content, if that matches with the size of file then
you can confirm that correct file is downloaded properly.
For this you can use the following function to check the download size:
web_get_int_property (HTTP_INFO_DOWNLOAD_SIZE);
PS: Place this request after you made call to your main request.
Solution:
Immediate resolution:
If you are sure that the test is complete and stopping the vuser forcefully won't affect your results
then safest way is to do a Stop Now. In case that button is disabled then disconnect the Load
Injector from the scenario. This will make the user to error-out. Re-connect the LG and re-collate
the test results (in case it didn't collate properly).
There are 2 ways to change this value; one is to change the config file or using a function in your
script.
Next thing you need to do is to restart the controller machine and register the controller dlls; this
can be done by running the batch file "register_controller.bat"
placed at: "LoadRunner Install Dir\bin"
Log-off and re-login to the machine.
This case can get worsen if you are using CITRIX protocol and you manually tried to stop a vuser
who was performing the below two functions at that time:
"ctrx_sync_on_bitmap_change" and "ctrx_sync_on_bitmap"
In case of you have large number of Vusers in your scenario then mention a limit on number of
vusers that can stopped at given time also how you stop them. The setting for ramp-down limit is
given in the LG properties:
• Go to "Run-Time Quota" tab of LG details page and select the check-box for limiting the
number of vusers that can be stopped and provide appropriate value in it.
Solution:
The below solution was tried and tested for SQL Server, Oracle and Sybase Databases using .Net
protocol in LR.
• Open a new .Net protocol script in Vugen.
• Go to Recording Options and choose the recording language to VB .Net.
• Launch browser to record. Once it is launched properly stop recording. This will generate a
blank script with reference to VB .Net libraries otherwise it will open a blank script with C#
libraries.
• The use the VB .Net code to create your connection and query the DB. Sample code is
given below:
***************
Dim retvalue As String = ""
Dim Count As String
Dim reader As OleDbDataReader
Dim myconnectionstr As String = "Provider=OraOLEDB.Oracle;Data Source=Database_Name;User
Id=XYZ;Password="& lr.decrypt(lr.eval_string("{Password_1}")) &";OLEDB.NET=True;"
Dim objConnection As New OleDbConnection(myconnectionstr)
' Query sample
Dim strSQL As String = "select * from table_Name"
Dim objCommand As New OleDbCommand(strSQL, objConnection)
objConnection.Open()
lr.start_transaction ("Query")
reader = objCommand.ExecuteReader()
if reader.HasRows then
lr.end_transaction ("Query", LR.PASS)
else
lr.end_transaction ("Query", LR.FAIL)
Msgbox("The Query has returned 0 rows")
end if
MsgBox(reader.HasRows)
If (reader.Read) Then
retvalue = reader(3).ToString
End If
reader.Close()
MsgBox(retvalue)
objConnection.Close()
objConnection = Nothing
reader = Nothing
objCommand = Nothing
************************
Pre-requisites: Machine should have .Net Framework and Database client drivers
You can create correct connection strings (depending upon the database) by referencing the below
site:
Solution:
• Open the "AnalysisSummary.asc" file placed at the location /bin/dat in wordpad or textpad
• Go to Section "Line22_Field0" in the file and scroll down to section "JoinedSelectString="
• Add the below Query in that
SELECT [Event_map].[Event Name] AS [Event Name],[Minimum],[Average],
[Maximum],StdVal,[Table2].[Value] AS [90 Percent], Round([PassedT].[CountAll],0) AS
Pass, Round([FailedT].[CountAll],0) AS Fail, Round([StoppedT].[CountAll],0) AS Stop FROM
(((((Event_map LEFT JOIN [Table1] ON [Table1].[Event Name] = [Event_map].[Event
Name]) LEFT JOIN (SELECT * FROM [Table0] WHERE [Transaction End Status] = 'Pass') AS
PassedT ON [Event_map].[Event Name] = [PassedT].[Event Name]) LEFT JOIN (SELECT *
FROM [Table0] WHERE [Transaction End Status] = 'Fail') AS FailedT ON [Event_map].
[Event Name] = [FailedT].[Event Name]) LEFT JOIN (SELECT * FROM [Table0] WHERE
[Transaction End Status] = 'Stop') AS StoppedT ON [Event_map].[Event Name] =
[StoppedT].[Event Name]) LEFT JOIN [Table2] ON [Event_map].[Event Name] = [Table2].
[Event Name]) LEFT JOIN [TempForSummaryRep0] ON [Event_map].[Event Name] =
[TempForSummaryRep0].[Event Name] WHERE [Event_map].[Event Type] = 'Transaction'
and ([Table2].[Percent] = 90 OR [Table2].[Percent] Is Null) GROUP BY [Event_map].[Event
Name],[Event_map].[Event ID], [Minimum],[Average],[Maximum],StdVal,
Round([PassedT].[CountAll],0), Round([FailedT].[CountAll],0), Round([StoppedT].
[CountAll],0),[Table2].[Value] ORDER BY [Event_map].[Event ID]
• Save the File and Open the analysis
This will get reflected in your transaction Name order.