jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: Local failures on ParallelResourcesAndIpSource
Date Sat, 05 Oct 2019 10:48:11 GMT

Am 04.10.19 um 19:55 schrieb Vladimir Sitnikov:
> It looks like
> https://github.com/apache/jmeter/pull/524#issuecomment-538478304
>
> I think I know what is going on there.
> TL;DR: it is Apache HTTP Client's bug: "wrong interface is used for DNS
> resolution when source IP is specified"

I'd say it is a Java bug, as InetAddress.getAllByName("localhost") is
resolving to one local address, only.

>
> @ham1 , @Felix would you please add `localIp` to `Assertions.assertEquals`
> message (the 3rd argument) and provide the new message?
> Could you please provide the output of `ping localhost` and `ping6
> localhost`?

ping is using IPv4 and ping6 IPv4. Both are working fine.


>
> 1) The whole nature of the test is to verify how HTTP client supports "the
> use of the specified source IP address" feature.
> In other words, HTTP Sampler has "source IP" field, which is propagated to
> the HTTP implementation.
> It is expected that JMeter should be able to send requests from the
> specified IP. That might help to load a single interface only, or to
> overcome 65536 ports per IP address limit or whatever.
As I tried to convey before. I believe this to be a bug in httpclient,
resp. Java. We are giving it the name, which is "bound" to an interface,
but Java fails to give back both (all) addresses that are available on
that interface. Therefore httpclient fails to iterate through all
interfaces (how could it:). 
>
> 2) Certain machines have both IPv4 and IPv6 at the same time. So far so
> good. WireMock listens on ALL the available interfaces.
Right
>
> 3) Java's HTTP client does not have "source IP" feature, so it is not
> really tested.
Correct
>
> 4) Apache's HTTP client has the "source ip" feature. However, we tell it
> "ok, use this ipv6 as a source IP and connect to localhost:33099".
> Theoretically, it should work. However, in practice, Apache HTTP client
> might easily resolve `localhost` as `127.0.0.1`. Of course, it can't really
> connect to `127.0.0.1` via IPv6, so we see `Network is unreachable`.
We can place a filter in our test to choose an address with the right
type, but the test has already been changed. You are too fast ;)
>
> We can work around that by using explicit IP address (127.1 for ipv4) and
> (::1 for ipv6) instead of localhost, but we might want to raise a bug for
> HTTP Client.

That would have been my preferred "fix".

Felix

>
> Vladimir
>

Mime
View raw message