[infinispan-dev] Hot Rod client sending data to itself - ISPN-8186
Alan Field
afield at redhat.com
Mon Aug 14 09:39:33 EDT 2017
Is this the issue, Bela?
https://issues.jboss.org/browse/JGRP-1116
Thanks,
Alan
----- Original Message -----
> From: "Galder Zamarreño" <galder at redhat.com>
> To: "infinispan -Dev List" <infinispan-dev at lists.jboss.org>
> Sent: Monday, August 14, 2017 9:04:50 AM
> Subject: Re: [infinispan-dev] Hot Rod client sending data to itself - ISPN-8186
>
> I did run a local test and indeed you get a bind exception if trying to bind
> a local port that's in use as server port:
>
> https://github.com/galderz/java-sandbox/blob/master/src/main/java/j/net/LocalPortClash.java
>
> I'll check JGRP source and JIRA and try to dig this further.
>
> Cheers,
>
> > On 14 Aug 2017, at 08:48, Bela Ban <belaban at mailbox.org> wrote:
> >
> > Right: the localHost:localPort combo of the client socket cannot be the
> > same as that of the remoteHost:remotePort.
> >
> > Do you happen to have the link to the JGroups issue? I also remember
> > this, but googling I failed to find it. Perhaps we can use the same
> > solution here that we used for the JGRP issue.
> >
> > I vaguely recall we checked the client's local address:port against some
> > server address:port and closed/re-created it is the same.
> >
> > On 11/08/17 20:56, Dennis Reed wrote:
> >> On 08/11/2017 11:50 AM, Galder Zamarreño wrote:
> >>> I must admit this scenario sounds very weird... how does Java allow you
> >>> for a local port to be bound to a port that's already in use by the
> >>> server? It doesn't make sense.
> >>
> >> You cannot bind to a port that's already in use.
> >>
> >> But if you're trying to connect to a port in the ephemeral range that's
> >> not in use, and the OS happens to assign that same IP:port to the local
> >> socket, it can connect to itself.
> >>
> >> (We've run into this in JGroups before, and it was a pain to track down
> >> what was going on).
> >>
> >> -Dennis
> >> _______________________________________________
> >> infinispan-dev mailing list
> >> infinispan-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> >>
> >
> > --
> > Bela Ban | http://www.jgroups.org
> >
> > _______________________________________________
> > infinispan-dev mailing list
> > infinispan-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Galder Zamarreño
> Infinispan, Red Hat
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
More information about the infinispan-dev
mailing list