how to check the namenode and datanoden logs ? as the services are not getting started..
Th default location is /var/log/hadoop/hdfs and here you wiill get
And it's important too to check the host server messages
Those files should contain the clue all the .out are informative look at the .log most probably the last few entries
1. If you are starting service via Ambari / Cloudera Manager UI then check the operation logs which are displayed in UI while you start the service
Please check for any errors in the logs clicking the service operational logs.
2. If you do not see any operational logs or any operation triggerred while you start/restart service then kindly restart agent service once [ambari agent/cloudera-scm-agent]
3. Else please check logs from cli as suggested by @Shelton
If you still need help please revert.