Make agent to connect the real ip first if no agent.controller.ip is provided