0
votes

I am not able to record external applications like Google from my office network. I tried the proxy setup pdf that is provided by Jmeter support, but still I am facing the issue. I am able to record for my company internal application.

the error I am facing in browser when I am trying to record the external application is as below

java.net.UnknownHostException: www.google.com at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.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:278) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:481) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:298) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105) at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:236)

Please help me to resolve this issue.

1

1 Answers

0
votes

It looks like that your JMeter instance isn't capable of connecting to the Internet. My expectation is that you're behind a corporate proxy.

So for successful recording follow the next steps:

  1. Launch JMeter providing several proxy-related command line arguments, to wit

    -H, --proxyHost <argument>
            Set a proxy server for JMeter to use
    -P, --proxyPort <argument>
            Set proxy server port for JMeter to use
    -N, --nonProxyHosts <argument>
            Set nonproxy host list (e.g. *.apache.org|localhost)
    -u, --username <argument>
            Set username for proxy server that JMeter is to use
    -a, --password <argument>
            Set password for proxy server that JMeter is to use
    

    See chapter 2.4.2 of JMeter's user manual for more details on Using a HTTP(S) Test Script Recorder

  2. Configure your browser to use JMeter host and port as a proxy. Given that browser and JMeter are on the same machine example configuration of Firefox browser is below:

Firefox JMeter Proxy

Another easier option to record JMeter test is using JMeter Google Chrome Extension, in that case you won't need to worry about proxy settings, SSL certificates, etc. and will be able to follow your test steps in Chrome browser and export recorded test into JMeter .jmx file.