I am getting java.net.unknownhostexception in jmeter on server



  • I am getting java.net.unknownhostexception in jmeter on server , while same test case works fine on my local machine. Can you suggest what configuration item is missing?



  • I can only think of one possible reason: your "server" doesn't have direct Internet connection and it's using a proxy server for accessing hosts outside of its intranet.

    JMeter by default considers that it has direct connection to the application under test, if this is not the case you can specify an upstream proxy for JMeter to use, it can be done in 2 ways:

    By passing the upstream proxy server details via command-line arguments like:

    jmeter -H your_proxy host -P your_proxy port ....
    By passing the upstream proxy server details via system.properties file (lives in "bin" folder of your JMeter installation:

    http.proxyHost=your_proxy_host
    http.proxyPort=your_proxy_port
    https.proxyHost=your_proxy_host
    https.proxyPort=your_proxy_port
    


Suggested Topics