Small improvements

``self.ip`` is unused and ``socket.gethostbyname`` often fails on vagrant test machines