The namenode web UI currently passes around the NN's configured RPC address in the URL. One of the places this is used is for file browsing; the NN redirects to a random DN, and the DN then uses the NN address from the URL to contact the NN. However, this fails when the NN RPC address is configured to be the wildcard (0.0.0.0).
The fix is the same as in
HDFS-3932: pass the configured address through NetUtils#getConnectAddress first.