If you are using Hadoop version-2.7.7, then I would like to suggest one more solution.
Run the command
hadoop namenode -format
Once the namenode is formatted, go to Hadoop-2.7.7/sbin directory and start all daemon with the command
After this, check that all your Hadoop daemons are running or not, with this command
I hope it will help.