You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Rafael H. Schloming (JIRA)" <ji...@apache.org> on 2015/01/06 13:57:35 UTC

[jira] [Commented] (PROTON-791) c-reactor-tests fails because it listens to an IPv4 socket but connects to an IPv6 socket

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

Rafael H. Schloming commented on PROTON-791:
--------------------------------------------

The reactor code is just delegating to the existing API provided by proton/io.h. It passes "0.0.0.0" into the bind and uses "localhost" on the connect. It looks like somehow "localhost" is getting turned into "::1".

I'm not sure exactly how to fix this or even where the bug is exactly. I would naively expect binding to "0.0.0.0" and connecting to "localhost" to just work, but I'm not super up to date on IPv6 stuff.

> c-reactor-tests fails because it listens to an IPv4 socket but connects to an IPv6 socket
> -----------------------------------------------------------------------------------------
>
>                 Key: PROTON-791
>                 URL: https://issues.apache.org/jira/browse/PROTON-791
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: Andrew Stitcher
>            Assignee: Rafael H. Schloming
>
> strace of relevant bits of failing run.
> {noformat}
> ...
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
> setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> bind(3, {sa_family=AF_INET, sin_port=htons(5672), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> listen(3, 50)                           = 0
> ...
> socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 4
> fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
> fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
> setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
> connect(4, {sa_family=AF_INET6, sin6_port=htons(5672), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
> poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN|POLLOUT}], 2, 1000) = 1 ([{fd=4, revents=POLLIN|POLLOUT|POLLERR|POLLHUP}])
> recvfrom(4, 0x1b19200, 16384, 0, 0, 0)  = -1 ECONNREFUSED (Connection refused)
> ...
> sendto(4, "AMQP\3\1\0\0\0\0\0!\2\1\0\0\0SA\320\0\0\0\21\0\0\0\2\243\tAN"..., 224, MSG_NOSIGNAL, NULL, 0) = -1 EPIPE (Broken pipe)
> {noformat}



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