All hosts appear as localhost

Problem

All your hosts appear as localhost.

Solution

Try adding a host entry for each machine in /etc/hosts for your Java configuration.

For more help

Recommendations for learning more: