jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish Sapariya <msapar...@gmail.com>
Subject Win7 connection refused, address is invalid on local machine, -Djava.net.preferIPv4Stack=true does not help
Date Fri, 12 Apr 2013 08:30:11 GMT
Hi All,
I am using source IP address in my HTTP sampler and I get following
exception.
Some of the posts suggest to use -Djava.net.preferIPv4Stack=true, but that
did not help fixing this.

I also disabled the IPv6 Stack (so do I believe), by un-checking the IPv6 in
network connection properties dialog box for all network connections.

Any pointer would be helpful.

Here is the exact trace I get in the response.

The test plan is very simple with one HTTP request and Src Ip address set to
my local IP address.

org.apache.http.conn.HttpHostConnectException: Connection to
http://example.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:645)
    at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
    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.sample(HTTPHC4Impl.java:286)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
    at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
    at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: connect: Address is invalid on local
machine, or port is not valid on remote machine
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    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)
    ... 12 more

-- 
Thanks and Regards,
Manish

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message