在启动Spark时用start-master.sh和start-slaves出现以下错误:

master: failed to launch: nice -n 0 /home/hyxy/apps/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://master:7077
master: full log in /home/hyxy/apps/spark/logs/spark-hyxy-org.apache.spark.deploy.worker.Worker-1-master.out
slave2: failed to launch: nice -n 0 /home/hyxy/apps/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://master:7077
slave1: failed to launch: nice -n 0 /home/hyxy/apps/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://master:7077

出现 以上问题:

可能是端口号被占用,在sbin/下 有lsof命令

可以用 lsof  -i:端口号 

查看正在使用此端口号的进程

如上图端口号8088被PID为5005的进程占用

只需用 kill -9 5005 kill掉就好了

然后重新在sbin/使用 start-master.sh start-slaves 

发布了16 篇原创文章 · 获赞 15 · 访问量 6118

猜你喜欢

转载自blog.csdn.net/ShengBOOM/article/details/97282861
今日推荐