Hi ,
I would suggest to do the following:-
1. Login to slave's /usr/bin.
2. Type the following command to check to which utility the spark-shell is linked.
ls -al spark*
It will print the following depending on your configuration.
lrwxrwxrwx 1 root root 29 Oct 18 01:03 spark-shell -> /etc/alternatives/spark-shell
lrwxrwxrwx 1 root root 30 Sep 30 03:11 spark-submit -> /etc/alternatives/spark-submit
lrwxrwxrwx 1 root root 30 Sep 30 03:11 spark2-shell -> /etc/alternatives/spark2-shell
lrwxrwxrwx 1 root root 31 Sep 30 03:11 spark2-submit -> /etc/alternatives/spark2-submit
3. Login to master shell /usr/bin:
ln -s /etc/alternatives/spark-shell spark-shell
The above command will create a link to the executable. Change the path "/etc/alternatives/spark-shell" as per your slave's configuration
Please remember to login as root user.
Let me know if it works.
Thanks,
Ganesh