8230435: Replace wildcard address with loopback or local host in tests - part 22
Summary: fixes tests to use the loopback address whenever possible. It also fixes some safe publishing issues, or add diagnostics in some of the tests.
Reviewed-by: michaelm