-1

i am new to jmeter and am trying to do a validation on GUI using Jmeter. while launching "http://toolsqa.com/software-testing/software-testing-tutorial/", getting "java.net.ConnectException: Connection timed out: connect" error. how can we resolve the issue? Logs:

    Request:

        GET http://toolsqa.com/software-testing/software-testing-tutorial
        GET data:
        [no cookies]
        Request Headers:
        Connection: keep-alive

Response data:

 java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket (PlainSocketFactory.java:121)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection (DefaultClientConnectionOperator.java:180)
    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:697)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:455)
    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.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
    at java.lang.Thread.run(Unknown Source)

HTTP-Request-snap

Login ToolHq request

sathish kumar
  • 255
  • 1
  • 3
  • 13

1 Answers1

0

most probably you’re running behing an enterprise proxy.

So you need to tell JMeter how to use it:

Add those option with you custom values to command line:

-H [proxy server hostname or ip address]

-P [proxy server port]

-N

[nonproxy hosts] (e.g. *.apache.org|localhost)

-u

[username for proxy authentication - if required]

-a

[password for proxy authentication - if required]

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • am using my office laptop,while connect with my mobile network it is working, but not it office network.so how we configured the proxy setting in jmeter [Note: this website are allowed in office network firewall using browser] – sathish kumar Sep 05 '18 at 07:32
  • So you need to see what is the browser proxy config and adapt it for jmeter using what I gave you – UBIK LOAD PACK Sep 05 '18 at 07:37
  • I configured with "http://proxy.xyzcompanyname.com/proxy.pac" url with default port (8080).am getting java.net.UnknownHostException:http://proxy.xyzcompanyname.com/proxy.pac at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192).How can we find the port details for configuration?[Note-have taken proxy details from IE browser] – sathish kumar Sep 05 '18 at 08:44
  • That's not how it should be configured. You need to open this pac file and look at rules for the server you're trying to hit, look for PROXY keyword and then you'll see what are the host of proxy used and what is the port. Try sharing content but obfuscate servers IP. – UBIK LOAD PACK Sep 05 '18 at 09:27