The Hadoop NameNode service won't start. You run start-dfs.sh and it starts the SecondaryNameNode and the DataNode. It won't start the NameNode.
Assumption: This solution only works if you are running the start-dfs.sh as a sudo user or the root user itself.
Verify you can ssh with root to the localhost. Run this command twice without exiting from the first session: ssh root@localhost
If you cannot do that, verify the SSH service is running. Verify you set up SSH keys for passwordless authentication for root. You will need to be able to run these in succession without exiting them: