Fix ip address retreival for server connectivity check

Change-Id: I23a65090feaccf9c18a096f51f84e2b9aee8e0a7