don't look for query port unless queryMasterAppName is non null and non empty