In MiniKMS, there is potential data race when create jetty server in createJettyServer. It looks like the code searches for a free port and then starts jetty, but maybe there's enough of a race condition between port location and jetty.start to cause intermittent failures.
We've seen test failures saying java.net.BindException: Address already in use, e.g. https://builds.apache.org/job/PreCommit-HDFS-Build/12942/testReport/
HADOOP-12417, we should always bind port 0 which gives us an ephemeral port, instead of searching a free port before starting jetty.