可查看hosts文件
root@ubuntu:/home/xiaoye/zookeeper# vim /etc/hosts
#127.0.0.1 localhost
#127.0.1.1 ubuntu
192.168.26.140 ubuntu
192.168.26.141 ubuntu2
192.168.26.142 ubuntu3
看到localhost被注销掉了,那就试着把他放开:
root@ubuntu:/home/xiaoye/zookeeper# vim /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu
192.168.26.140 ubuntu
192.168.26.141 ubuntu2
192.168.26.142 ubuntu3
然后重新启动spark,就行了。
如果是个集群就全部都放开;