SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, tutorials, tools and downloads for SQL Database Programmers, Developers, Windows and Office Users

JMeter HTTP Request Sampler Error

Recently I downloaded and installed Apache JMeter to test performance of a web site but failed to execute my test plan which consists of an HTTP Request sampler. I later understood that a missing configuration for web proxy caused this error which occurred during executing my web site test plan. In this guide, I want to share with testers how they can configure their JMeter application for a successful test plan execution.

Recently I created a new test plan in JMeter and created an HTTP Request sampler for measuring web site performance of a specific address.
When I run the test plan, I got following error message:

Response code:Non HTTP response code: java.net.UnknownHostException
Response message:Non HTTP response message: www.kodyaz.com

JMeter HTTP Request Sampler error

Although the problem seemed to be unknown host pointing to domain name or chosen HTTP/HTTPS protocol, later I realized that setting up the web proxy will resolve this problem.
If you are running JMeter to test web applications on the internet especially behind an enterprise network, you should always keep in mind that you should apply the same proxy configuration on JMeter tool as well.

To identify your proxy settings you can launch Microsoft Edge browser.
Then search for "proxy" in settings.
You can also directly put "edge://settings/?search=proxy" in the address bar and navigate to.
You will see "Open your computer's proxy settings" shortcut item in the search result list.
Another method to reach the same result is opening the "System and performance" in the Edge browser's settings menu.

web browser proxy settings

Click on the hyperlink to display proxy settings

manual and automatic proxy setup

If manual proxy settings is configured, you can find the related proxy server host or IP address and port detail from manual proxy setup section.
As alternative if automatic proxy setup is configured via a script execution, you can download the script from your browser, open the downloaded configuration file with a text editor like Notepad and check for proxy host and port details within that configuration file.

To configure JMeter test plan HTTP request samplers for using web proxy address, open HTTP Request sampler. On Advanced tab, you will see Proxy Server section.
You should enter the proxy server name or IP address and port number in minimum.
If required, you may also provide a valid username and password for the proxy.

proxy server configuration on JMeter test tool

After I completed the proxy server settings for my JMeter HTTP request sampler, I could successfully run the JMeter test plan without any error.




Copyright © 2004 - 2024 Eralper YILMAZ. All rights reserved.