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

First outbound stream on WebRTC connection server side times out consistently #3690

Closed
mxinden opened this issue Mar 27, 2023 · 1 comment · Fixed by #3625
Closed

First outbound stream on WebRTC connection server side times out consistently #3690

mxinden opened this issue Mar 27, 2023 · 1 comment · Fixed by #3625
Labels

Comments

@mxinden
Copy link
Member

mxinden commented Mar 27, 2023

Summary

Using libp2p/universal-connectivity#3, the first outbound substream always timeouts. When using libp2p-gossipsub as the first NetworkBehaviour that outbound substream drops the subscribe message to the remote.

[2023-03-27T18:00:16Z DEBUG libp2p_gossipsub::handler] Dial upgrade error: Protocol negotiation timeout.

Possible Solution

Version

Still need to write a reproducer. Posting here anyways for tracking purposes.

One can build a reproducer on top of libp2p/universal-connectivity@a8c18c8.

Hacky solution for now is to retry on outbound substream dial upgrade error.

Would you like to work on fixing this bug?

Maybe

@thomaseizinger
Copy link
Contributor

In case the bug turns out to be in webrtc and not in our code, it is going to be difficult to fix because we can't upgrade at the moment. See #3552.

@mergify mergify bot closed this as completed in #3625 Apr 14, 2023
mergify bot pushed a commit that referenced this issue Apr 14, 2023
Previously, we closed the entire connection upon receiving too many upgrade errors. This is unnecessarily aggressive. For example, an upgrade error may be caused by the remote dropping a stream during the initial handshake which is completely isolated from other protocols running on the same connection.

Instead of closing the connection, set `KeepAlive::No`.

Related: #3591.
Resolves: #3690.

Pull-Request: #3625.
tcoratger pushed a commit to tcoratger/rust-libp2p that referenced this issue Apr 14, 2023
Previously, we closed the entire connection upon receiving too many upgrade errors. This is unnecessarily aggressive. For example, an upgrade error may be caused by the remote dropping a stream during the initial handshake which is completely isolated from other protocols running on the same connection.

Instead of closing the connection, set `KeepAlive::No`.

Related: libp2p#3591.
Resolves: libp2p#3690.

Pull-Request: libp2p#3625.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants