Security handshake error on invalid swarmctl command
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
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 @diogomonica Is this still relevant somehow?
It still applies to swarmctl. We don't care much about swarmctl. Marking as P3 but leaving open.
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!