kubo
kubo copied to clipboard
tls: received unexpected handshake message
I sometimes see this error while running pubsub tests using go-ipfs over the js ipfs-http-client:
HTTPError: connect QmewgY9zBbguYZmTjjhXmzLdmEWk7UJc7bDmnNQiex1PtR failure: failed to dial QmewgY9zBbguYZmTjjhXmzLdmEWk7UJc7bDmnNQiex1PtR: all dials failed
* [/ip4/127.0.0.1/tcp/52633] failed to negotiate security protocol: tls: received unexpected handshake message of type *tls.clientHelloMsg when waiting for *tls.serverHelloMsg
It's during the test setup, it's started three go-ipfs nodes and is using ipfs.swarm.connect to get them to dial each other.
Any idea what could be causing this?
not really sure, would have to do some looking into it. @Stebalien any ideas?
This sounds like TCP simultaneous connect.
This sounds like TCP simultaneous connect.
You're sure? An incoming connection should use a different file descriptor - shouldn't it?
Maybe we skip dialing when we have an incoming connection, use this and forget to flip the direction?
https://github.com/libp2p/go-tcp-transport/issues/21
http://ttcplinux.sourceforge.net/documents/one/tcpstate/tcpstate.html
This is a TCP simultaneous connect, as @Stebalien said. We had a proposal somewhere to handle this gracefully, but it was never implemented.
@marten-seemann @Stebalien was there an agreed upon solution to this that we haven't implemented yet, or is this still in the "we need to figure it out how to do this correctly" stage?
I've just encountered the same problem
Fixed by #10933
@gammazero I’m not sure #10933 solves this issue since it’s observed outside of the kubo tests which is all that PR changes?