try multiple ports for core connection before giving up