On Fri, Aug 11, 2017 at 3:30 PM, Sanne Grinovero <sa...@infinispan.org> wrote:
> On 11 August 2017 at 14:14, Galder Zamarreño <gal...@redhat.com> wrote: > > Hi, > > > > Re: https://issues.jboss.org/browse/ISPN-8186 > > > > I'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]. > > > > What I'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'd require us to generate a random local port and see if that > works, making sure that's not the server port... > > > > However, I think the real problem we'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? > > > > Any other ideas? > > You could create multiple aliases for the same loopback device, and > assign a different IP address to each of them. > No need for aliases, we could use directly use any IP from the range 127.0.0.0/8 Just a reminder, the testsuite should be able to run on Linux/Win/MacOS so I'd stay away for OS specific extra steps > > But I fail to understand why you don't have specific ports for each > purpose? That's the point for using ports in the first place, no? > > The issue is the suite runs 15 tests in parallel, with each test starting potentially more than 1 server; the client(s) obtains the server port(s) dynamically and start a connection, but with bad luck the client's localport happens to be the same as the server random port. > Thanks, > Sanne > > > > > > Cheers, > > > > [1] https://gist.github.com/galderz/b8549259ff65cb74505c9268eeec96a7 > > [2] http://docs.oracle.com/javase/6/docs/api/java/net/Socket. > html#Socket(java.net.InetAddress,%20int,%20java.net.InetAddress,%20int) > > -- > > Galder Zamarreño > > Infinispan, Red Hat > > > > > > _______________________________________________ > > infinispan-dev mailing list > > infinispan-dev@lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > _______________________________________________ > infinispan-dev mailing list > infinispan-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/infinispan-dev >
_______________________________________________ infinispan-dev mailing list infinispan-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev