jmeterunknown-host

Getting unknown host exception in jmeter


I have been testing HTTP request for the URL: www.google.com and getting unknown host error in jmeter.

HTTP REQUEST PAGE[![][1]


Solution

  • The error means that JMeter cannot resolve the IP address of google.com website. Most probably this is due to your network settings, i.e. your machine uses a corporate proxy in order to access the Internet.

    Contact your network administrator in order to obtain the required proxy settings (hostname, port, username and password) and configure JMeter to use the proxy server to access external resources, i.e. launch it as:

    jmeter -H your_proxy_host -P your_proxy_port -u your_proxy_username -a your_proxy_password
    

    Apart from the above:

    1. Don't load test public resources without explicit permission of their owner as your actions might be considered as DoS attack and your IP address might become blacklisted. So use something from your Intranet instead of Google, this way you will kill 2 birds with one stone:

      • you will not need to configure proxy
      • your actions will be clear from the law perspective

      if you don't have anything you can test in your Intranet you can consider using special websites like blazedemo.com or newtours.demoaut.com

    2. According to JMeter Best Practices you should always be using the latest available JMeter version so consider upgrading to JMeter 5.0 (or whatever is the current version available at JMeter Downloads page)