spark-shell is not started properly so you are getting this error.
Please follow the below steps.
==> Open the terminal and fire reboot.
==> Now when the VM starts fire sudo service hadoop-master restart
==> sudo jps.
==> Now open a new terminal and follow commands below.
==> Now open another terminal and start the spark-shell
Please try and let us know if you face any issue.
We are eagerly waiting for your response.