[ 
https://issues.apache.org/jira/browse/PROTON-1133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15159022#comment-15159022
 ] 

Ken Giusti commented on PROTON-1133:
------------------------------------

This issue is caused by a defect in the way Reactor obtains the socket address 
for its connections.

The reactor - or more specifically, the io_handler used by connections created 
via the reactor - expects to find the socket address in the Connection's 
'hostname' property.  See proton-c/src/reactor/connection.c:pni_handle_bound().

This isn't the correct use of 'hostname' as per the AMQP 1.0 spec:

"The name of the host (either fully qualified or relative) to which the sending 
peer is connecting. It is
not mandatory to provide the hostname. If no hostname is provided the receiving 
peer SHOULD
select a default based on its own configuration. This field can be used by AMQP 
proxies to
determine the correct back-end service to connect the client to.
This field MAY already have been specified by the sasl-init frame, if a SASL 
layer is used, or,
the server name indication extension as described in RFC-4366, if a TLS layer 
is used, in which
case this field SHOULD be null or contain the same value. It is undefined what 
a different value
to that already specified means"

Reactor assumes that the user will set the transport-level address (eg socket 
address) in the hostname property.  Thus port information needs to be placed in 
the 'hostname' (if 5672 is not used).  It also forces the user to set hostname 
to a numeric address if necessary.

This conflicts with the above specification.

Reactor needs a different approach to configuring the transport-level address 
that doesn't conflict with the hostname property.

> Proton C includes port number in AMQP Open hostname
> ---------------------------------------------------
>
>                 Key: PROTON-1133
>                 URL: https://issues.apache.org/jira/browse/PROTON-1133
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c, python-binding
>    Affects Versions: 0.12.0
>            Reporter: Chuck Rolke
>             Fix For: 0.13.0
>
>
> A command like:
> {noformat}
> qdmanage -b amqp://u1:password@photoserver:21000 --type policyStats query
> {noformat}
> sends the port number in the hostname field of the AMQP Open:
> {noformat}
> Mon Feb  8 11:37:46 2016 SERVER (trace) [2]:0 <- @open(16) 
> [container-id="34e49947-b4df-4a01-9570-0a74e9e57b5b", 
> hostname="photoserver:21000", channel-max=32767] 
> (/home/chug/git/qpid-dispatch/src/server.c:75)
> {noformat}
> Built in C example code using Proton only does the same thing.
> This bug originally reported at 
> https://issues.apache.org/jira/browse/DISPATCH-214



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to