Connection Refused while Recording a script using jmeter

2,292 views
Skip to first unread message

Sri Aditya

unread,
Mar 14, 2016, 7:46:08 AM3/14/16
to JMeter Forum
HI All,
 
i have fallowed  the same procedure which is listed in the Apache site

i am getting the fallowing Connection refused Timed out response. tried with different browsers too Mozilla, chrome and internet Explorer, i couldnt abe to figure it out,
can anyone please help me on this.


and also i have attached two snapshots one for the network settings and the other is the Jmeter Https Test script recorder,

please let me know if  iam wrong some where.
org.apache.http.conn.HttpHostConnectException: Connection to http://www.google.com refused
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
	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:505)
	at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:328)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1141)
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:236)
Caused by: 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:127)
	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
	... 10 more






Thaks,

Sri aditya


Dmitri T

unread,
Mar 16, 2016, 2:30:51 AM3/16/16
to JMeter Forum
Most likely you're sitting behind the corporate proxy, you need to provide corporate proxy server host and port to JMeter somehow. 

  • Via command-line arguments like:
jmeter -H proxy_host -P proxy_port

  • Via system.properties file (it is located under /bin folder of your JMeter installation), add the next few lines to it 
http.proxyHost=proxy_host
https.proxyHost=proxy_host
http
.proxyPort=proxy_port
https
.proxyPort=proxy_port

Again, these properties can be also passed as command-line arguments like:
jmeter -Dhttp.proxyHost=proxy_host ....


References:

You might also like to use JMeter Chrome Extension which allows recording JMeter tests right from Chrome browser.
Reply all
Reply to author
Forward
0 new messages