Azure Marketplace "Load Tester (multiple remote servers) Powered by Apache JMeter™" Users manual

Last updated:


Select a language: [English] [日本語]

Introduction

This is the simplified manual for “Load Tester (multiple remote servers) Powered by Apache JMeter™” from Azure Marketplace.

What’s Load Tester (multiple remote servers) Powered by Apache JMeter™

“Load Tester (multiple remote servers) Powered by Apache JMeter™” performs stress tests from multiple JMeter servers.

* If single server are required for stress tests, please use “Load Tester (standalone) Powered by Apache JMeter™”.

Main feature of Load Tester (multiple remote servers) Powered by Apache JMeter™

  • Apache JMeter 5.6.3, 5.6.2, 5.6, 5.5, 5.4.3, 5.4.2, 5.4.1, 5.4 and 5.3
  • Can connect from Microsoft Remote Desktop client. (xrdp installed)
  • Can replicate a test across many low-end computers and thus simulate a larger load on the server.
  • Can distribute CSV Data files to all JMeter servers.
  • Added Japanese, Korean, Chinese fonts.
  • Ubuntu 20.04 LTS
  • Generally provided as a virtual machine, and several other PaaS are used.

System requirements

  • JMeter client(front end) virtual machine can connect through TCP/3389. (If you want to operate with GUI in Windows Remote Desktop)
  • JMeter client(front end) Virtual machine can connect through TCP/22. (If you want to operate with CLI in SSH)

How to build

Access to “Create Load Tester (multiple remote servers) Powered by Apache JMeter™” and Create.

The description of deployment parameters is as follows:

  • “Basic” tab

    • Subscription, Resoruce group, Region
      Enter or select the subscription, resource group and region
    • Username
      Specify the Username.
    • Authentication type
      • If you selected “Password”
        • Password, Confirm password
          Specify the password the SSH and Remote Desktop connection (same as JMeter client and servers).
      • If you selected “SSH Public Key”
        • SSH public key
          Specify the SSH public key you created (same as JMeter client and servers).
        • Password for Remote Desktop connection, Confirm password
          Specify the password used to authenticate the Remote Desktop connection.
  • “Networking” tab

    • Virtual network
      Specify the name and CIDR of the newly created or existing virtual network.
    • JMeter client Subnet
      Specify the subnet name and CIDR where the virtual machine of JMeter client is deploy.
    • JMeter servers Subnet
      Specify the subnet name and CIDR where the virtual machines of JMeter servers is deploy.

    If you selected an existing virtual network and that subnets have an NSG assigned, you need to apply the following rules to those NSGs:

    • JMeter client subnet
      • Allow inbound TCP/1099,30000-65535 from JMeter servers subnet
      • Allow inbound TCP/3389,22 from terminal connecting to JMeter client
    • JMeter servers subnet
      • Allow inbound TCP/1099,3000-65535 from JMeter client subnet
  • “Storage” tab

    • File shareing storage account
      Specify the Azure storage account to share CSV Data files and various settings to JMeter servers.

      You can change the storage account name etc. by clicking “Create New”, but “StorageV2” will be set no matter which Account kind is selected.

  • “JMeter client” tab

    • JMeter client virtual machine name
      Specify the host name of JMeter client.
    • Size
      Select the instance size of JMeter client.
    • OS disk type
      Choose Azure managed disks types.
    • Public IP
      Specify the Public IP address for the JMeter client.

      If you are deploying JMeter client on an existing virtual network with a NAT Gateway, the Public IP SKU must be “Standard”.

    • DNS name label(option)
      Specify the DNS Prefix for the JMeter client.
  • “JMeter servers” tab

    • Virtual machine scale set name
      Specify the virtual machine scale set name of JMeter servers.
    • Size
      Select instances size of JMeter servers.
    • OS disk type
      Choose Azure managed disks types.
    • Instance count
      Specify the number of JMeter servers.
    • Public IP address per instance
      If the servers to be tested by JMeter is on the Internet side, enable this option to give each JMeter servers a dedicated public IP address.

      If you are deploying the JMeter server on an existing virtual network with a NAT Gateway, this value must be disabled.
      It is recommended to enable this value if the virtual network does not have a NAT Gateway and the target to be tested by JMeter is the Internet side.

    Be aware of Azure subscription limits. (Number of vCPUs, number of instances, number of public IP addresses, etc.)

  • “Tags” tab
    Tag the created resources.

Network Security Group (NSG) is applied to the virtual machine NIC.

The following rules have been added to the NSG inbound security rules for JMeter client NIC:

  • Allow RDP(TCP/3389) from any connection source
  • Allow SSH(TCP/22) from any connection source

You should change this NSG settings to only allow connections from where you need it.

How to use

* “How to use Apache JMeter” is not included in this document.

Connect to JMeter client

Select your preferred type of operation, GUI with Remote Desktop or CLI with SSH.

Use for GUI

  1. Remote Desktop Connection

    1. Connect with Remote Desktop (RDP) from the client PC.

      • Computer : Input the Public IP Address found from the previous How to build Section. It can also be found on the Summary Blade.
    2. The Remote Desktop screen appears and a dialog box of “Login to (virtual machine name)” is displayed. Set the following information and click [OK]

      • Session : Xorg
      • username : The user name you specified when you deployed from Marketplace
      • password : The password you specified when you deployed from Marketplace
  2. Start JMeter application

    1. Double-click [JMeter] on the remote desktop screen.

    2. You can change the display language from [Choose Language] on the [Options] menu.

Use for CLI

Please connect to JMeter client virtual machine and operate with SSH.

JMeter Path: /usr/local/jmeter

Distribute CSV Data files

JMeter client and all JMeter servers mounting shared storage on the /mnt/jmuserdata directory.

Therefore, store the file in the /mnt/jmuserdata directory in the JMeter client, the file will be available to the JMeter servers.

Also, by specifying the destination directory in the /mnt/jmuserdata/sync.to file from the JMeter client as follows, the files in the /mnt/jmuserdata directory will be synchronized to that directory on each JMeter servers.

[/mnt/jmuserdata/sync.to]

# Load Tester user files copy setting file
#
# The files in this directory will be synced to the directory listed in this file when the JMeter servers are started.
# If there are files in the destination directory that are not in this directory, they will be deleted.
#
/mnt/resources/jmuserdata
  • Synchronous timing
    When starting the JMeter servers (Restarting the JMeter servers virtual machine scale set will synchronize the all JMeter servers)
  • Synchronization method
    • All files and directories in the corresponding directory on the local disk of the JMeter servers will have the same contents as on the shared disk.
    • Even if a new file is added or updated on the local disk of the JMeter servers, it will be overwritten or deleted at the next synchronization timing.
    • If you change the setting of the synchronization destination directory, the files and directories that have already been synchronized to each JMeter server will not be deleted and will remain as they were at that point.
  • Running on the JMeter client
    • In the JMeter client, a symbolic link is created to the directory specified in /mnt/jmuserdata/sync.to at the timing set by the JMeter client.
    • However, it will not be created if the settings are changed from outside the JMeter client.
      In this case, restarting the JMeter client will create the symbolic link.
    • If you change the setting of the synchronization destination directory, the created symbolic links will not be removed.
  • Recommendations and notes
    • Valid for Load Tester newly deployed on or after January 20, 2021 (UTC).
    • If you stored too many files in the /mnt/jmuserdata directory to fit in the synchronization destination storage, the JMeter servers will not work properly.
    • Basically, it is recommended to use /mnt/resoures/jmuserdata as the sync destination directory (Since the local temporary disk is mounted)
      However, due to the unstable performance of local temporary disks in the A series, we recommend /tmp/jmuserdata or similar.

Change instance size of JMeter client and JMeter servers

You can change the instance size of JMeter client and servers using Azure portal and Azure CLI etc.

Change number of JMeter servers

You can change the number of JMeter servers using Azure portal and Azure CLI etc.

After changing the number of JMeter servers, execute the following command to update the servers list referenced from JMeter client.
It update /usr/local/jmeter/bin/jmeter.properties file.

$ ~/refresh-jmeter-servers.sh

Adjust JAVA arguments

If you want to adjast JAVA arguments (for example, -Xmx, -Xms), refer to the following.

JMeter client

Update “JVM_ARGS” environment variable in ~/.loadtester

After that, logout from the JMeter client and then login again.

JMeter servers

Modify the following “/mnt/systmp/jmeter-server-option.sh” file on JMeter client and restarting the virtual machine scale set of JMeter servers from the Azure portal, etc.

Adjust "jmeter.properties" for JMeter servers

Modify the following “/mnt/systmp/jmeter.properties” file on JMeter client and restarting the virtual machine scale set of JMeter servers from the Azure portal, etc.

If you change this files with incorrect contents, the JMeter servers may not start, so it is recommended to backup the files before changing.

Change JAVA version

By default JMeter works on JRE 8.

The following JRE has been installed on the virtual machine and can be changed to any version.

  • JRE 8 (default)
  • JRE 11
  • JRE 17

Add the JAVA_HOME setting to the end of “~/.loadtester” and “/mnt/systmp/jmeter-server-option.sh” on the JMeter client.

  • Using JRE 11: export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"

Example using for JRE 11.

export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"

After that, logout from the virtual machine of JMeter client, then login again and restart the virtual machine scale set of JMeter servers on the Azure portal, etc.

Updates for softwares

For the software version of Ubuntu and JMeter, the latest version at the time of registration in Marketplace has already been applied.

Please update Ubuntu and software as necessary.

FAQ

Can’t connect to virtual machine with Remote Desktop

You need to be able to connect to Virtual Machine via TCP/3389 port.
Please check the following.

  • Is it set to allow TCP/3389 inbound rule with Azure NSG assigned to subnet or NIC?
  • In the case of via Azure LoadBalancer, is the LoadBalancer properly forwarding to TCP / 3389 of the virtual machine?

OS does not start normally / Can’t login to Remote Desktop

2GB or more of OS memory is required to operate the virtual machine normally.
Change the Azure Virtual machine or Virtual machine scale set to the appropriate size.

Apache JMeter™ does not start due to lack of memory

Adjust the heap memory size used by JMeter by specifying -Xms and -Xms in the JVM_ARGS environment variable.
See Adjast JAVA arguments in the “How to use” section.

Can’t deploy Virtual machine or Virtual machine scale set

If an error such as “QuotaExceeded” or “PublicIPCountLimitExceededByVMScaleSet” is output during deployment, the number of vCPUs or public IP addresses exceeds your subscription limit.
In that case, contact Azure support to increase the limit value, or reduce the size or number of virtual machines and then redeploy.

When run the remote distributed testing, you get the following error and can’t do the test

Error serialVersionUID

Error in rconfigure() method java.rmi.ServerException:  RemoteException occurred in server thread; nested exception is:  
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:  
    java.io.InvalidClassException: org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase; local class incompatible: stream classdesc serialVersionUID = {???}, local class serialVersionUID = {???}

The JMeter versions of the client and server may be different.
To make the client and servers JMeter versions the same, specify the JMeter version by the select-jmeter-version.sh script, and then restart the JMeter servers virtual machine scale set from the Azure portal.

e.g.) How to set JMeter version to 5.3

  1. Specify the version to use by the select-jmeter-version.sh script

    $ ~/select-jmeter-version.sh 5.3
    Success
    Please restart JMeter servers virtual machine scale set.
    

    Currently selectable JMeter versions

    • 5.5
    • 5.4.3
    • 5.4.2
    • 5.4.1
    • 5.4
    • 5.3
  2. Restart the virtual machine scale set of JMeter servers by the Azure portal, etc.

If the ~/select-jmeter-version.sh script does not exist, you are using an older release of Load Tester and cannot select a JMeter version.
In this case, the client and servers versions can be aligned by creating a /mnt/systmp/jmeter-version file that describes the JMeter version using the following procedure.

  1. Know the client’s JMeter version

    $ /usr/local/jmeter/bin/jmeter.sh -v
    

    If the output is the following, the JMeter version is 5.3.
    jMeter.sh -v

  2. Write the JMeter version to the /mnt/systmp/jmeter-version file

    $ echo 5.3 > /mnt/systmp/jmeter-version
    $ cat /mnt/systmp/jmeter-version
    5.3
    
  3. Reimage all instances of the virtual machine scale set of the JMeter servers by the Azure portal, etc.

During deployment, “The tags in VMExtension ‘CustomScriptExtension’ do not match the tags of virtual machine scale set ‘{JMETER SERVERS NAME}’. If tags are specified, they must match.” error.

This occurs when subject to policies such as Azure Policy “Inherit a tag from the subscription if missing”.
When deploying the Load Tester in Azure Portal, you can avoid this problem by setting the same tags in the “Tags” tab as those set in the inherited source.

Supports

Support is available at a charge.

  • Supported inquiries example
    • The target solution can not be deployed.
    • Virtual machines does not work properly after deployment
  • The following are not supported

If you wish to support, please contact below.

Apache®, Apache JMeter™, JMeter, and the feather logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.