S Installation failed. Failed to receive heartbeat from agent

2973 MainThread agent ERROR Failed to connect to previous supervisor.
error: [Errno 111] Connection refused
Monitor-HostMonitor throttling_logger ERROR Could not find local file system for /var/log/cloudera-scm-agent

I am facing these error while adding nodes to cluster(cdh).
If any one could help please let me know which ports do i need to map while

  1. starting cloudera manager server container and
  2. agent container.