This error is simply saying that user root@localhost is not allowed to execute this command with no password. If you have the password set for root@user modify you command as " mysqlfailover --master=root:YOURMYSQLPASSWORDFORROOT@localhost:3306 --discover-slaves-login='root' --log=log.txt"
This should solve the problem.