Dear Raghu,
Hope you are doing great.
It is looking like your datanode is not running.
Please use the below given command in terminal to solve the problem :
1. sudo service hadoop-master restart
2. hadoop dfsadmin -safemode leave
3. sudo jps
Now try to execute your commands and let us know it is working or not.
We will be waiting for your response