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

very large number of "protocol mux failed: connection reset" errors #339

Closed
whyrusleeping opened this issue Jun 3, 2018 · 15 comments
Closed

Comments

@whyrusleeping
Copy link
Contributor

I'm playing around with debugging connectivity issues, and i'm seeing a lot of these errors coming out of basichost. It could be normal, but it definitely seems a bit odd. I'm opening this issue to track finding the cause and determining whether or not this is a deeper issue.

@whyrusleeping
Copy link
Contributor Author

cc @bigs @Stebalien

@Stebalien
Copy link
Member

Could be TCP port scans (if this is happening when negotiating secio).

@whyrusleeping
Copy link
Contributor Author

@Stebalien mind elaborating a bit?

@Stebalien
Copy link
Member

That is:

  1. Someone opens a TCP connection to us (e.g., to see if we're an IPFS node, or just to do a port scan).
  2. They immediately close it.
  3. We try to negotiate secio.
  4. That obviously fails because the connection has been reset.

Alternatively, this could be evil ISPs resetting our connections when we open too many (Comcast did this for a while in an attempt to break bittorrent).

@whyrusleeping
Copy link
Contributor Author

@Stebalien but i'm seeing these without a listener. I'm only dialing outwards.

@whyrusleeping
Copy link
Contributor Author

also see notes on: libp2p/go-libp2p-kad-dht#139 (comment)

@whyrusleeping
Copy link
Contributor Author

"connection reset" is coming from yamux. It really means that the stream was reset, not the connection. Thanks yamux.

@Stebalien
Copy link
Member

Where does the "protocol mux failed" come from?

@Stebalien
Copy link
Member

Ah... Lazy negotiation.

@Stebalien
Copy link
Member

Ah, no, I know exactly where this is coming from. A peer is trying to connect via a protocol you don't speak (probably bitswap). After you refuse to speak any of the requested protocols, the peer (correctly) hangs up with a reset. We should ignore these.

@Stebalien
Copy link
Member

Actually, should we be nice on encountering an unsupported protocol? We could nicely close the connection but that takes more time.

@whyrusleeping
Copy link
Contributor Author

No, we can't do that. I think we previously had a bug caused by that, where we would open a stream and start writing to it, and since the other side didnt support the protocol and only closed it, we never found out, and just kept writing into the void.

@whyrusleeping
Copy link
Contributor Author

Overall, I think this error i'm seeing here isnt really a problem. Just took a little while to figure out what it actually meant

@Stebalien
Copy link
Member

I'm going to at least improve the error message.

@whyrusleeping
Copy link
Contributor Author

do it. You can change the world.

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