Spark壳拒绝从mesos硕士提供

w46czmvw  于 2021-06-26  发布在  Mesos
关注(0)|答案(1)|浏览(310)

我一直在尝试学习mesos上的spark,但spark shell却一直无视这些提议。以下是我的设置:
所有组件都在同一子网中
ec2示例上有1个mesos主机(t2.micro)
命令: mesos-master --work_dir=/tmp/ --hostname=<public IP> 2个mesos代理(每个代理具有4个内核、16 gb ram和30 gb磁盘空间)
命令: mesos-slave --master="<private IP of master>:5050" --hostname="<private IP of slave>" --work_dir=/tmp/ ec2示例(t2.micro)上的sparkshell(client)在启动sparkshell之前,我在这个示例上设置了以下环境变量

export MESOS_NATIVE_JAVA_LIBRARY=/usr/lib/libmesos.so
export SPARK_EXECUTOR_URI=local://home/ubuntu/spark-2.1.1-bin-hadoop2.7.tgz

然后我发射Spark壳如下

./bin/spark-shell --master mesos://172.31.1.93:5050

(主机私有ip)
我保证 spark-2.1.1-bin-hadoop2.7.tgz 放置在 /home/ubuntu 在两个代理上,在启动Spark壳之前。
一旦spark shell启动,我就运行最简单的程序

val f = sc.textFile ("/tmp/ok.txt");
f.count()

.. 我一直得到spark shell的以下日志

(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

主端日志:(我在sparkshell中执行任何操作之前就看到了这些日志,即使我在sparkshell中运行了上面的代码,它们也会一直出现)

I0521 15:14:12.949108 10166 master.cpp:6992] Sending 2 offers to framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596
I0521 15:14:12.955731 10164 master.cpp:4731] Processing DECLINE call for offers: [ 64c1ef67-9e4f-4236-bb86-80d7aaab540f-O34 ] for framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596
I0521 15:14:12.956130 10167 master.cpp:4731] Processing DECLINE call for offers: [ 64c1ef67-9e4f-4236-bb86-80d7aaab540f-O35 ] for framework 64c1ef67-9e4f-4236-bb86-80d7aaab540f-0000 (Spark shell) at scheduler-7a375e65-7a0d-4267-befa-e69937404d5f@172.31.1.203:45596

我在ubuntu16.04上使用mesos1.2.0和spark2.1.1。我已经通过编写一个基于node.js的小型http客户机进行了验证,主服务器提供的服务看起来不错。这里可能出了什么问题?

uklbhaso

uklbhaso1#

好吧,这里有两个问题。
这个 SPARK_EXECUTOR_URIlocal ,所以改成 http . local 我猜是针对hadoop的(请在这里纠正我)。
将uri更改为 local ,netty blockmanager服务,作为mesos executor启动的spark executor的一部分运行(作为任务,粗糙模式),mesos executor由mesos代理启动,mesos containerizer由mesos代理启动,用于尝试绑定到公共ip时失败,因为我已将主机名作为公共ip传递给mesos代理,该代理在ec2中肯定会失败。事实上,我一开始是在传递私有ip,但不记得为什么我把主机名改成了公共ip。可能是为了检查沙箱日志。mesos主机将其重定向到mesos代理的私有ip,阻止我查看stderr日志(我位于ec2专有网络之外)。注意,上面的问题将私有ip传递给代理,这是正确的。最初,上面的问题是针对第一个问题发布的。

相关问题