Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why MDNS is announcing port 4001 #652

Closed
Stebalien opened this issue May 30, 2019 · 2 comments
Closed

Figure out why MDNS is announcing port 4001 #652

Stebalien opened this issue May 30, 2019 · 2 comments

Comments

@Stebalien
Copy link
Member

See: ipfs/kubo#6389 (comment).

This is a regression (go-ipfs 0.4.20 works, 0.4.21 doesn't).

@sanderpick
Copy link

sanderpick commented Jun 6, 2019

Hey @Stebalien - I've been running into this... should have looked here sooner.

I believe this is a result of the host not having any addresses set when the MDNS server starts.

16:45:38.479 DEBUG       mdns: Handling MDNS entry: 192.168.0.6:4001 12D3KooWGUxThtVHzfwUCjWfEhEdtjiLYhhwJ9E1aQZqTyTW764b mdns.go:155
16:45:38.480 WARNI    p2pnode: trying peer info:  {12D3KooWGUxThtVHzfwUCjWfEhEdtjiLYhhwJ9E1aQZqTyTW764b: [/ip4/192.168.0.6/tcp/4001]} discovery.go:23

4001 is just the default:

https://github.com/libp2p/go-libp2p/blob/master/p2p/discovery/mdns.go#L71

If I move the port acquisition into the polling logic, the host eventually has addresses and the server can be started.

sanderpick added a commit to sanderpick/go-ipfs that referenced this issue Jun 6, 2019
Prevents the MDNS server from starting when the host has zero addresses.

Re: libp2p/go-libp2p#652

Signed-off-by: Sander Pick <sanderpick@gmail.com>
sanderpick added a commit to sanderpick/go-ipfs that referenced this issue Jun 6, 2019
Prevents the MDNS server from starting when the host has zero addresses.

Re: libp2p/go-libp2p#652

Signed-off-by: Sander Pick <sanderpick@gmail.com>
@Stebalien
Copy link
Member Author

Thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants