Support Questions

Find answers, ask questions, and share your expertise

Change Ambari heartbeat and handshake ports


Due to many reasons I am not able to use ports 8440 and 8441 for Ambari handshakes and heartbeats. Where can I set these ports to something suitable for my environment?

Thx a lot.


@Milan Sladky

Try through this command.

ambari-server setup-security

View solution in original post


@Milan Sladky

Try through this command.

ambari-server setup-security

No, it's not possible to set it up there... 😞

@Milan Sladky

What error you are getting? alternatively you can try setting below parameter manually in file and see if that solve your problem. Make sure amabri agent conf should knows about these ports.


Thanks for pointing me out @Jitendra Yadav, I was able to get it working via config files. However which one of these options in ambari-server setup-security" will achieve the same result?

[root@poc3:/etc] ambari-server setup-security
Using python  /usr/bin/python
Security setup options...
Choose one of the following options: 
  [1] Enable HTTPS for Ambari server.
  [2] Encrypt passwords stored in file.
  [3] Setup Ambari kerberos JAAS configuration.
  [4] Setup truststore.
  [5] Import certificate to truststore.
Enter choice, (1-5):

@Milan Sladky

Great 🙂 , please accept the answer to close this thread.

@Milan Sladky

per documentation it say we can add the property "client.api.port=<port_number>" and can modify the port number to some other value -

But this doesn't works. When i tried adding this property and restart ambari then usually ambari listen on both ports - ie new port and 8441.

When checked in ambari code, i see the value is hard coded. Please check below -

ambari ->

public static final String SRVR_TWO_WAY_SSL_PORT_DEFAULT = "8441";

public static final String SRVR_ONE_WAY_SSL_PORT_DEFAULT = "8440";

I think this is BUG.

For client you can use "/etc/ambari-agent/conf/ambari-agent.ini"

and modify below params -



I was able to get it working:

On the Ambari Server set these parameters in /etc/ambari-server/conf/


On the Ambari Agent set "url_port" and "secured_url_port" parameters in [server] section in /etc/ambari-agent/conf/ambari-agent.ini:


Then restart both server and agent(s).


Created Jira issue: to correct/clarify the linked instruction