try ip if hostname fails