Revert "use ipaddr not hostname"

This reverts commit 0965658197599818268a5dc086153bdcf6df7ac0.