close #1757 fix check_port_availablity for new rest config