Added a 'retry' if port number was not successfully retrieved for an application.