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

tls: received unexpected handshake message #7516

Open
achingbrain opened this issue Jul 1, 2020 · 6 comments
Open

tls: received unexpected handshake message #7516

achingbrain opened this issue Jul 1, 2020 · 6 comments
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization

Comments

@achingbrain
Copy link
Member

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?

@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Jul 1, 2020
@aschmahmann
Copy link
Contributor

not really sure, would have to do some looking into it. @Stebalien any ideas?

@Stebalien
Copy link
Member

Stebalien commented Jul 1, 2020 via email

@RubenKelevra
Copy link
Contributor

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?

@Stebalien
Copy link
Member

Stebalien commented Jul 2, 2020 via email

@marten-seemann
Copy link
Member

This is a TCP simultaneous connect, as @Stebalien said. We had a proposal somewhere to handle this gracefully, but it was never implemented.

@lidel lidel added the need/analysis Needs further analysis before proceeding label Jul 24, 2020
@aschmahmann
Copy link
Contributor

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/analysis Needs further analysis before proceeding need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

6 participants