【发布时间】:2018-03-08 16:23:52
【问题描述】:
我在从运行在 YARN 上的 Spark 集群外部的机器上提交 spark-submit 远程作业时遇到问题。
Exception in thread "main" java.net.ConnectionException: Call from remote.dev.local/192.168.10.65 to target.dev.local:8020 failed on connection exception: java.net.ConnectionException: Connection Refused
在我的 core-site.xml 中:
<property>
<name>fs.defaultFS</name>
<value>hdfs://target.dev.local:8020</value>
<property>
在集群中的 hdfs-site.xml 中,我还禁用了 HDFS 的权限检查:
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
<property>
另外,当我从集群外的机器上远程登录时:
telnet target.dev.local 8020
我得到了
telnet: connect to address 192.168.10.186: Connection Refused
但是,当我
telnet target.dev.local 9000
上面写着已连接。
当我ping target.dev.local 时,它也可以工作。
我来自远程机器的 spark-submit 脚本是:
export HADOOP_CONF_DIR=/<path_to_conf_dir_copied_from_cluster>/
spark-submit --class org.apache.spark.examples.SparkPi \
--master yarn \
--deploy-mode cluster \
--driver-memory 5g \
--executor-memory 50g \
--executor-cores 5 \
--queue default \
<path to jar>.jar \
10
我在这里错过了什么?
【问题讨论】:
标签: apache-spark hdfs hadoop-yarn hadoop2