<div dir="ltr">On Fri, Aug 11, 2017 at 3:30 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11 August 2017 at 14:14, Galder Zamarreño &lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Re: <a href="https://issues.jboss.org/browse/ISPN-8186" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/ISPN-8186</a><br>
&gt;<br>
&gt; I&#39;ve been looking at TRACE logs and what seems to happen is that is that sometimes, when the client needs to create a new Socket, it sends using the same localport as the Hot Rod server port. As a result, when the client sends something to the server, it also receives it, hence it ends finding a request instead of a response. Analysis of the logs linked in the JIRA can be found in [1].<br>
&gt;<br>
&gt; What I&#39;m not sure about is how to fix this... There are ways to potentially pass a specific localport to a Socket [2] but this could be a bit messy: It&#39;d require us to generate a random local port and see if that works, making sure that&#39;s not the server port...<br>
&gt;<br>
&gt; However, I think the real problem we&#39;re having here is the fact that both the server and client are bound to same IP address, 127.0.0.1. A simpler solution could be a way to get the server to be in a different IP address to the client, but what would that be that IP address and how to make sure it always works? Bind the server to eth0?<br>
&gt;<br>
&gt; Any other ideas?<br>
<br>
</span>You could create multiple aliases for the same loopback device, and<br>
assign a different IP address to each of them.<br></blockquote><div><br></div><div>No need for aliases, we could use directly use any IP from the range <a href="http://127.0.0.0/8">127.0.0.0/8</a><br></div><div>Just a reminder, the testsuite should be able to run on Linux/Win/MacOS so I&#39;d stay <br></div><div>away for OS specific extra steps<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But I fail to understand why you don&#39;t have specific ports for each<br>
purpose? That&#39;s the point for using ports in the first place, no?<br>
<br></blockquote><div><br><br></div><div>The issue is the suite runs 15 tests in parallel, with each test starting potentially more than 1 server; <br></div><div>the client(s) obtains the server port(s) dynamically and start a connection, but with bad luck the client&#39;s <br></div><div>localport happens to be the same as the server random port. <br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Sanne<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; [1] <a href="https://gist.github.com/galderz/b8549259ff65cb74505c9268eeec96a7" rel="noreferrer" target="_blank">https://gist.github.com/<wbr>galderz/<wbr>b8549259ff65cb74505c9268eeec96<wbr>a7</a><br>
&gt; [2] <a href="http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#Socket(java.net.InetAddress,%20int,%20java.net.InetAddress,%20int)" rel="noreferrer" target="_blank">http://docs.oracle.com/javase/<wbr>6/docs/api/java/net/Socket.<wbr>html#Socket(java.net.<wbr>InetAddress,%20int,%20java.<wbr>net.InetAddress,%20int)</a><br>
&gt; --<br>
&gt; Galder Zamarreño<br>
&gt; Infinispan, Red Hat<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a><br>
<br>
______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a></div></div></blockquote></div><br></div></div>