That doesn't look like a problem connecting to the ODI Agent to me at first glance as the context that you're getting in the error is http://localhost:6551/aif not oraclediagent.
Have you got any more information in the context after you see Traceback? Or do you have anything in the logs in user_projects/domains/EPMSystem/servers/ErpIntegrator0/log folder or the user_projects/domains/EPMSystem/servers/ErpIntegrator1/logfolder folder for the other managed server around the same timestamp that you saw the problem? If there are problems I'd usually expect there to be some additional information in the ErpIntegrator0.log or ErpIntegrator1.log in most cases.
It was actually http://localhost:6551/oraclediagent. The issue got resolved now. In a clustered environment it expects that the ports are same on both the nodes. In our case on one node it was 6550 and on another it was 6551. So in the registry it is updating with the latest port value, that is the port on node2.
Here it is able to interpret localhost to the node that is hosting ErpIntegrator managed server. To test this I kept both the managed servers up (ErpIntegrator0 & ErpIntegrator1), then tried checking the connectivity on Data management page. It didn't succeed. Then stopped ErpIntegrator1, kept ErpIntegrator0 up no luck. Stopped ErpIntegrator0 and Up the ErpIntegrator1. Then with localhost:6551 the ODI agent connectivity works fine.
So I conclude that the port should be same on both nodes. One other finding was if we install a separate standalone ODI agent on the server and try to use that on Data management page it does not work in a clustered env. Where as in a single node setup we can update the host & port of oracledi agent.