0

I have a Thread Group in JMeter with multiple HTTP requests. When it is executed on higher number of threads in a distributed testing environment there are a lot of Host unreachable errors in results.

Non HTTP response code: java.net.NoRouteToHostException/Non HTTP response message: No route to host (Host unreachable)

70% of all the errors are caused by this error message.Could it be caused by a firewall or rate limiter?

2 Answers 2

1

As per exception description:

Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.

If it happens only under the load I can think of 2 possible cases (or combination):

  1. Your system under test cannot handle that many concurrent users, the related application shuts down or becomes unresponsive and HTTP Request samplers cannot reach it.

    • check system under test logs
    • check whether it has enough headroom to operate in terms of CPU, RAM, etc. If you don't have better monitoring solutions you can use JMeter PerfMon Plugin
  2. There is a router or switch which considers this traffic as anomaly and blocks the access.

You can also enable debug logging for JMeter's HttpComponents by adding the next line to log4j2.xml file:

<Logger name="org.apache.http" level="debug" />

and then take a look at jmeter.log file, it should contain more information from the network level

Sign up to request clarification or add additional context in comments.

Comments

1

If you are able to successfully execute your load test with a small throughput, however you are receiving Host Unreachable errors when attempting to scale your test to higher throughputs (i.e., higher loads), there are several things to consider:

  • If you are running your load test locally without these errors, however they appear when you run your load test through a cloud-based load provider with the same or higher throughput, consider the following causes:

    1. Network bandwidth to the target test application has been exceeded. Consider this especially if the these errors occur later in the test or at a point where throughput is increased.
    2. Routing rules are in place from load generator instances (e.g., VMs running on AWS or Azure are blacklisted on an ACL, request limit cap, rules preventing too many requests from same endpoint, traffic flagged as suspicious, etc.).
  • If you are encountering these errors when running your test from the same environment, only with a higher throughput, consider the following causes:

    1. The local machine cannot handle the higher throughput, due to either insufficient local machine resources (CPU, memory, etc.).
    2. The local machine network bandwidth has been exceeded and therefore request routing cannot complete.
    3. Network bandwidth capacity between the local machine and the target test application has been exceeded.
    4. Routing rules are in place preventing requests (e.g., request limit cap, rules preventing too many requests from same endpoint, traffic flagged as suspicious, etc.)
  • In either case, the cause of your errors may be due to your target test application becoming overwhelmed with requests. If your objective is to test for maximal load by probing the breaking point of your application, then this would be considered a positive and desired endpoint for your load test.

Note that not all of these causes necessarily point to a problem with your test. Depending on your test objectives, encountering these errors can be an expected outcome. This is especially true if the objective of your test is to test the maximal load your target test application can support. In the event you are encountering limited local machine resources or local network bandwidth, cloud-based load testing providers can be advantageous in that nearly unlimited resources are available. Reading more about scaling your load test in the cloud may be useful in this case.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.