jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish Sapariya <msapar...@gmail.com>
Subject Re: Win7 connection refused, address is invalid on local machine, -Djava.net.preferIPv4Stack=true does not help
Date Fri, 12 Apr 2013 08:57:29 GMT
Thanks for reply Seb.

It works fine if I do not use the Source IP address, as expected.

jmeter version 2.9

C:\>java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)

Sorry  I forgot to note that, I tried following things but the results are
same.
 - I tried with Java 1.6 64 bit
 - Java 1.7 32bit and 64 bit
 - apache jmeter 2.6


Same test plan works on my XP and Linux box
with Source IP address.

Regards,
Manish




On Fri, Apr 12, 2013 at 2:16 PM, sebb <sebbaz@gmail.com> wrote:

> On 12 April 2013 09:30, Manish Sapariya <msapariya@gmail.com> wrote:
>
> > Hi All,
> > I am using source IP address in my HTTP sampler and I get following
> > exception.
> >
>
> What happens if you don't use the source IP address?
>
> Version of JMeter?
>
> Java?
>
>
> > 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