MAPREDUCE-6090. mapred hsadmin getGroups fails to connect in some cases. Contributed by Robert Kanter
(cherry picked from commit 1cf31980474bf9ac28e51b6f014eae09eda9e15f)