Apache spark spark shell拒绝mesos master的报价

Apache spark spark shell拒绝mesos master的报价,apache-spark,mesos,mesosphere,Apache Spark,Mesos,Mesosphere,我一直在努力学习mesos上的spark,但spark shell却一直无视这些提议。以下是我的设置: 所有组件都在同一子网中 EC2实例上的1台mesos主机(t2.micro) 命令:mesos主机--work\u dir=/tmp/abc--hostname= 2个mesos代理(每个代理具有4个内核、16 GB ram和30 GB磁盘空间) 命令:mesos slave--master=“:5050”--hostname=“--work_dir=/tmp/abc ec2实例(t2.mi

我一直在努力学习mesos上的spark,但spark shell却一直无视这些提议。以下是我的设置:

所有组件都在同一子网中

  • EC2实例上的1台mesos主机(t2.micro)

    命令:
    mesos主机--work\u dir=/tmp/abc--hostname=

  • 2个mesos代理(每个代理具有4个内核、16 GB ram和30 GB磁盘空间)

    命令:
    mesos slave--master=“:5050”--hostname=“--work_dir=/tmp/abc

  • ec2实例(t2.micro)上的1个spark shell(客户端) 在启动spark shell之前,我已经在这个实例上设置了以下环境变量

    export MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so
    export SPARK_EXECUTOR_URI=local://home/ubuntu/spark-2.1.1-bin-hadoop2.7.tgz
    
     (0 + 0) / 2]17/05/21 15:13:34 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
    17/05/21 15:13:49 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
    17/05/21 15:14:04 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
    
    然后我启动火花壳,如下所示

    ./bin/spark-shell --master mesos://172.31.1.93:5050 
    
    (船长的私人知识产权)

    我已确保将
    spark-2.1.1-bin-hadoop2.7.tgz
    放置在 启动spark shell之前,在两个代理上安装
    /home/ubuntu

一旦spark shell启动,我将运行最简单的程序

val f = sc.textFile ("/tmp/ok.txt");
f.count()
。。我一直在获取spark shell的以下日志

export MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so
export SPARK_EXECUTOR_URI=local://home/ubuntu/spark-2.1.1-bin-hadoop2.7.tgz
 (0 + 0) / 2]17/05/21 15:13:34 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
17/05/21 15:13:49 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
17/05/21 15:14:04 WARN TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources
主端日志:(我在spark shell中执行任何操作之前就看到了这些日志,即使我在spark shell中运行了上述代码,这些日志仍然会出现)


我正在Ubuntu 16.04上使用Mesos 1.2.0和spark 2.1.1。我已经通过编写一个基于node.js的小型http客户机进行了验证,主服务器提供的服务似乎很好。这里可能出了什么问题?

好的,这里有两个问题

  • SPARK\u EXECUTOR\u URI
    local
    ,因此将其更改为
    http
    <代码>本地我想是针对hadoop的(请在此处更正)

  • 将URI更改为
    local
    后,netty blockmanager服务作为mesos executor启动的spark executor的一部分运行(作为任务,粗略模式),mesos executor由mesos agent启动,mesos Containerrizer启动,用于尝试绑定到公共IP时失败,因为我已将主机名作为公共IP传递给mesos代理,这在EC2中注定会失败。事实上,一开始我是在传递私有IP,但不记得为什么我把主机名改成了公共IP。也许是为了检查沙箱日志。Mesos主机将其重定向到Mesos代理的私有IP,阻止我查看stderr日志。(我位于EC2专有网络之外)。注意,上面的问题将私有IP传递给代理,这是正确的。最初,上面的问题是针对第一个问题发布的


  • 你看到了吗?你能发布被拒绝的员工信息和工作机会吗?这可能是一个与IP相关的问题。您能否确认提供的IP与配置匹配?提供包含与您用于连接的主IP相同的主IP?它基本上无法处理以“local”开头的executor uri。我把它改为“http”,然后它继续运行,由于其他原因失败了。下面是日志:好的,我找到了问题所在。代理内部的执行器尝试绑定到公共IP,该IP在ec2中运行时注定会失败。将mesos代理的主机名参数设置为私有Ip,它就工作了。很酷,将其添加为应答并接受。您可以设置
    LIBPROCES\u IP
    以实现类似效果。发布答案,谢谢!