Skip to content

Can't open NewStream on 0.41.1 #3296

Closed
Closed
@master255

Description

@master255

The bug is stably reproduced!
Version 0.41.1.
I can do this:
m.host.Connect(m.ctx, peerServer)
No error is returned.
And then I immediately do:
stream, err = m.host.NewStream(network.WithAllowLimitedConn(m.ctx, protocol), id, protocol)
and I get the error: connection failed

This lasts indefinitely. Until I restart the application completely.

This is a connection between nodes with white ip addresses.

Upd: And I've even found what causes the error:
I have another app running on the same device, with a different host id, which is also already successfully connected to the same host (which I can't connect to). The same DHT prefix is used.

The error occurs in protocol identification here:

if err := msmux.SelectProtoOrFail(proto, s); err != nil {

The error is returned by the library go-multistream 0.6.0

Error text:
Application error 0x1001 (remote)

If I shut down an application that is successfully connected, the error goes away.
What to do? How to fix the error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions