I am not very clear about waht do you mean by two CLI here. Can you please let us know how are you starting those components?
Are you starting those components using the following commands?
nohup hadoop-daemon.sh start namenode &
nohup hadoop-daemon.sh start datanode &
- You can run then in background or use Ambari to manage the start & stop.
Are you following the below mentioned doc: