swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

Security handshake error on invalid swarmctl command

Open aaronlehmann opened this issue 10 years ago • 4 comments

When I run a swarmctl command without sufficient arguments, and it prints out the usage message, the swarm manager logs an error:

2016/04/25 17:53:54 grpc: Server.Serve failed to complete security handshake from "127.0.0.1:58209": EOF

This can be triggered by swarmctl service create with no other arguments, for example.

cc @diogomonica

aaronlehmann avatar Apr 26 '16 00:04 aaronlehmann

Took a quick look. The problem is that each swarmctl subcommand starts by opening a grpc connection. Then it handles flags (some of which involve using the grpc connection to look things up). If the flags are bogus, swarmctl exits, and that may look like a failed handshake on the manager side.

The fix is probably to dial the grpc connection lazily if any of the options require its use. This involves touching every subcommand. Low priority.

aaronlehmann avatar May 02 '16 17:05 aaronlehmann

@aaronlehmann @diogomonica Is this still relevant somehow?

aluzzardi avatar Aug 04 '16 21:08 aluzzardi

It still applies to swarmctl. We don't care much about swarmctl. Marking as P3 but leaving open.

aaronlehmann avatar Aug 04 '16 23:08 aaronlehmann

Thanks for opening this issue. We haven’t seen any recent activity, so I’m closing it for now.

If it’s still relevant, feel free to reopen it or open a new issue with additional details. Thanks!

smerkviladze avatar May 04 '26 11:05 smerkviladze