Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spark workers asking for password

The question I am about to ask has already been asked, but there was no answer. Here is the link: Spark Installation | Unable to start spark slaves - asking password

In my master computer (computer that will be the master), I have set the slaves file(which contains the ip of the worker computer i.e. 192.168.10.131), I have set the spark-env.sh file(export SPARK_MASTER_IP=192.168.2.57 and some other exports for cores and memory for the slave, still on the master computer). I also copied the spark-env.sh file to the worker computer in the spark/conf directory. I used ssh-keygen (on my master computer) and copied the appropriate file to the worker computer with ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] (I executed this command from master computer), and now I can log in to the worker machine with ssh without password. When I finally execute ./start-all.sh script, it starts the master but asks for password when starting the worker (password for [email protected], note that the username is the masters username and the ip is the worker`s ip). Did I do something wrong or something else is wrong?

like image 357
Al Jenssen Avatar asked Sep 12 '25 22:09

Al Jenssen


1 Answers

Well, both computers had different usernames (master and worker). The trick is to use the same usernames i.e master for both computers.Just create a user on worker computer with same username and password as the master computer. That way when the worker asks for password you just login with the the master`s password. If someone has something to add, please do. Hope I helped!!!

like image 172
Al Jenssen Avatar answered Sep 15 '25 20:09

Al Jenssen