I recently accidentally included a list of masters where I fat-fingered the host names and included the same node twice.
I got some stack trace and an error message about duplicate keys inserted into a map. I eventually figured out what I did wrong, but the error condition was not super helpful.
Please add an early validation step that explicitly captures this conditions and provides a helpful error message that includes the name of the host name which was duplicated on the command line.
This happened for me with kudu ksck but there may be other candidates as well.