How are you able to associate machine agent with application?
If the app has APM node from same machine agent host, then the user needs to make sure APM node hostname and machine agent hostname value are resolved same, one way to force the hostname to be same is using -Dappdynamics.agent.uniqueHostId= arg. Ideally, the machine agent will automatically associate to APM application given the hostname for APM node and machine agent are auto resolved same as well. refer doc https://docs.appdynamics.com/display/PRO45/Standalone+Machine+Agent+Installation+Scenarios
I hope that answers.
I named the APM node hostname and Machine agent hostname the same via -Dappdynamics.agent.uniqueHostId= arg. However, it does not work. The issue still persist.