Skip to content

Conversation

@laanwj
Copy link
Member

@laanwj laanwj commented Dec 28, 2018

Backport of #14968 to 0.17 branch.

Currently the HTTP server initialization (`HTTPBindAddresses`) fails
only when *all* bindings fail. So if multiple binds are specified
(`127.0.0.1` and `::1` by defeault) and one succeeds and the other
fails, the latter is essentially ignored.

This commit changes the error behavior to fail *if not all* binds could
be performed, which I think is more in line with how software normally
handles this and what users expect.
@laanwj laanwj added this to the 0.17.2 milestone Dec 28, 2018
@laanwj
Copy link
Member Author

laanwj commented Dec 28, 2018

Let's see if we can reproduce the problem w/ Travis test coverage on master @luke-jr mentions here #14968 (comment)

@laanwj
Copy link
Member Author

laanwj commented Dec 28, 2018

This is interesting, apparently the first test p2p_compactblocks fails, but not, say, creating the cache. This is a different problem than #14968 used to have.

 node0 2018-12-28T10:10:15.279652Z Allowing HTTP connections from: 127.0.0.0/8 ::1/128 
 node0 2018-12-28T10:10:15.279730Z Binding RPC on address ::1 port 16704 
 node0 2018-12-28T10:10:15.279807Z libevent: getaddrinfo: address family for nodename not supported 
 node0 2018-12-28T10:10:15.279830Z Binding RPC on address ::1 port 16704 failed (Error: Success (0)). 
 node0 2018-12-28T10:10:15.279842Z Binding RPC on address 127.0.0.1 port 16704 
 node0 2018-12-28T10:10:15.279913Z Unable to bind all endpoints for RPC server 
 node0 2018-12-28T10:10:15.279940Z Error: Unable to start HTTP server. See debug log for details. 

What is different in the environment for 0.17 that could explain this? The libevent version? The test environment?

I didn't see any getaddrinfo: address family for nodename not supported on master. Looks like here, even the lookup of ::1 fails before it gets to binding!

@laanwj laanwj closed this Dec 28, 2018
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant