I found a lot of following log in active RM log file after doing failover RM
I looked forward RM logs and find this app had finished before hours
The reason of RM prints " Cannot get RMApp by appId" is as follows:
1. RM failover
2. NM reports all running apps to RM in register request
3. The running apps are from NMContext, some apps may already finished
4. In my cluster, yarn.log-aggregation-enable=false, yarn.nodemanager.log.retain-seconds=86400(1day), so app is kept in NMContext before app has finished for 24 hours
5. My Yarn cluster runs 50k apps per day and 7k nodes, and NM will report many finished apps to RM.