qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stitcher (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-3375) qpid-route does not resolve hostname and this causes problems with localhost among others
Date Fri, 29 Jul 2011 16:10:12 GMT

    [ https://issues.apache.org/jira/browse/QPID-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072885#comment-13072885

Andrew Stitcher commented on QPID-3375:

I think there are a number of problems with this proposed change:

1. Federation tests during "make check" depend on using loopback addresses:
They set up multiple brokers on a single machine and wire them together with loopback routes.
Disallowing loopback routes would prevent this testing. It may be possible to figure out an
external network address for the machine, but this cannot be guaranteed (not all machines
have an external address, but all have loopback with most current networking setups)

2. You can't resolve the names to get IP addresses at configuration time:
* The current federation mechanism automatically retries under many circumstances including
name resolution failure, this is actually a real feature in that it allows the name->address
mapping to change or to round robin in a way that resolving ahead of time doesn't.
* In a mixed IPv4/IPv6 network doing the lookup somewhere other than the machine actually
making the connection _at the time the connection is needed_ may not get the correct answer.
Actually the is is true for any network but in a mixed network the v4 and v6 connectivity
may differ across the network.
* The address resolution will usually return multiple IP addresses which need to be tried
in turn. You can't do this in config-route as it can currently only send a single name.

> qpid-route does not resolve hostname and this causes problems with localhost among others
> -----------------------------------------------------------------------------------------
>                 Key: QPID-3375
>                 URL: https://issues.apache.org/jira/browse/QPID-3375
>             Project: Qpid
>          Issue Type: Bug
>          Components: python tools
>    Affects Versions: 0.10
>         Environment: All
>            Reporter: William Henry
>            Assignee: Gordon Sim
>              Labels: qpid-route
>         Attachments: qpid-route, qpid-route.diff
> All the examples for Federation and qpid-route use localhost. For a multihost environment
this is not a good idea.
> 1. 'localhost':<port> can end up in the routing table of remote host erroneously.
> 2. Resolving localhost doesn't help as you'd end up with in the route erroneously
> 3. Even non localhost names don't get resolved and checked.
> Here is the test I was performing. 
> I was doing some playing/testing with federation and I used two machines: my
> laptop (sligo) and a remote machine (buzz).  I ran three brokers: 2 on sligo on
> ports 5672 and 5682 and one on remote on port 5682.
> From sligo I set up some links between all the brokers.
> (The problem has already occurred on the links above. Listing the routes will show the
problem. But we'll go on)
> From sligo I set up a topic exchange on each broker:
> $ qpid-config -a localhost:5672 add exchange topic T.Prod
> $ qpid-config -a localhost:5682 add exchange topic T.Prod
> $ qpid-config -a buzz.somedomain.com:5682 add exchange topic T.Prod
> On sligo I set up dynamic routes from source localhost:5672 to localhost:5682
> and buzz.somedomain.com:5682.
> When I list the routes from sligo I see:
> $ qpid-route route list localhost:5682
> localhost:5682 localhost:5672 T.Prod <dynamic>
> $ qpid-route route list buzz.somedomain.com:5682
> buzz.somedomain.com:5682 localhost:5672 T.Prod <dynamic>
> When I run example program drain on localhost:5682 on sligo I get the messages sent using
the spout example program to default broker on sligo (on 5672).
> When I run drain on buzz I don't see anything.
> I see references to "localhost:5672" in the trace output of buzz's broker.  This is BAD!
> We need qpid-route to resolve hostname before passing the arg to the remote
> broker.
> (In the meantime we might want to warn users of using 'localhost' with
> qpid-route across different hosts.)
> I will attach a diff and a new version of qpid-route for review.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org

View raw message