change hostip to hostname and then resolve it using Java InetAddress