赞
踩
这个是问题的显示
[root@centos-1 spark-standalone]# sbin/start-all.sh
starting org.apache.spark.deploy.master.Master, logging to /opt/module/spark-standalone/logs/spark-root-org.apache.spark.deploy.master.Master-1-centos-1.out
: Name or service not knownstname centos1
: Name or service not knownstname centos2
: Name or service not knownstname centos3
起因是:之前看视频教程,他里面用Xftp软件,能直接对Linux的文件内容进行修改,但他所使用的文本编辑软件是:Notepad++。我图省事就直接用记事本编辑了“slaves”这个文本,然后启动的时候,hosts没识别出来。
原因:用windows的编辑器编辑后或者可能是我下载到windows上写过后再复制回去,他的文本属性改变为“dos”文件类型。原来的数据类型是“unix”。我把文本类型改过后就可以启动了。
[root@centos-1 spark-standalone]# sbin/start-all.sh
org.apache.spark.deploy.master.Master running as process 10008. Stop it first.
centos1: Warning: Permanently added 'centos1' (ECDSA) to the list of known hosts.
centos2: Warning: Permanently added 'centos2' (ECDSA) to the list of known hosts.
centos3: Warning: Permanently added 'centos3' (ECDSA) to the list of known hosts.
centos1: starting org.apache.spark.deploy.worker.Worker, logging to /opt/module/spark-standalone/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-centos-1.out
centos2: starting org.apache.spark.deploy.worker.Worker, logging to /opt/module/spark-standalone/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-centos-2.out
centos3: starting org.apache.spark.deploy.worker.Worker, logging to /opt/module/spark-standalone/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-centos-3.out
[root@centos-1 spark-standalone] jps
10008 Master
10330 Worker
10397 Jps
改变文件类型方法如下:
先进入文件编辑vim slaves
但不按“i”进入编辑文本,直接输入:set ff?
来查看你的文本格式。(这个会在最下方显示),如果是“dos”的话,改变为“unix”::set ff=unix
。然后回车即可,他回车没反应的,直接“:wq”退出就行。
总结:如果不是很多的文本内容要修改的话,直接在linux里修改就行了,省得出现各种各样的麻烦。但也是我编辑器没有正确使用的缘故,同志们还是不能偷懒,不然会有各种各样莫名其妙的问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。