0
votes

I've been experiencing this kind of error upon running my test script on JMeter?

java.net.UnknownHostException: h2ebiz-testat java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)at java.net.InetAddress.getAddressesFromNameService(Unknown Source)at java.net.InetAddress.getAllByName0(Unknown Source)at java.net.InetAddress.getAllByName(Unknown Source)at java.net.InetAddress.getAllByName(Unknown Source)at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:654)at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:413)at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:240)

1

1 Answers

0
votes

h2ebiz-testat doesn't look like a normal Internet address to me, if you can access this host via web browser but getting the UnknownHostException in JMeter most probably you don't have a direct network connection on your machine and you're accessing Intranet and Internet resources via proxy server.

So check your browser proxy settings and make sure to configure JMeter to use your company proxy, it can be done in 2 ways:

  1. Using command-line arguments like:

    jmeter -H your_proxy_host -P your_proxy_port .....
    

    in this case you will need to pass these arguments each time you start JMeter

  2. Using system.properties file (lives in "bin" folder of your JMeter installation), add the next lines:

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

    in this case the changes will be permanent