AMBARI-5797. Agent function get_port_from_url is broken (aonishuk)