We are on HDP 2.3.2 and Ambari 2.1.2. Services on the secondary name node not failed to start getting an error message connection refused on server:port
There are many reasons, but the most common are:
The port is not open on the destination machine.
The port is open on the destination machine, but its backlog of pending connections is full.
A firewall between the client and server is blocking access (also check local firewalls).
After checking for firewalls and that the port is open, use telnet to connect to the ip/port to test connectivity.
telnet localhost port
If it is listening, it is able to respond.
This removes any potential issues from your application.
netstat -anp | grep port
The lsof command reveals similar information since it is also capable of linking open ports to services:
lsof -i | grep port
At time you need to kill the process using that port