运行 docker 中 Mesos 上的 Spark 出错

Error in running Spark on Mesos in docker

我有两个节点docker。每个 docker 上都安装了 Zookeeper、Mesos 和 Spark。我在 "slaves" 文件上指定 "slaves" 我只有一主一从。另外,我在同一路径的每个节点上都有一个 "docker-compose.yaml" 。我在每个节点中做 "docker-compose up"。然后在master节点里面,docker,我运行 dispatcher:

  "/home/spark/sbin/start-mesos-dispatcher.sh     --master 
  mesos://150.20.11.136:5050".

之后我 运行 我的程序用这个命令:

 "/home/spark/bin/spark-submit --name test_mesos --master 
 mesos://150.20.11.136:5050 --executor-cores 4 --executor-memory 6G -- 
 files iran2.npy --py-files a.zip myprogram.py".

当 运行ning 我的程序时,我得到这个错误:

Initial job has not accepted any resources; check your cluster UI to ensure that workers are registered and have sufficient resources

我搜索了很多。我禁用防火墙,第一次它工作;但现在我根本不工作。此外,我在 docker 撰写文件中通过 "expose" 打开了 docker 中的所有端口。我减少了提交命令中的资源。但是 none 解决了我的问题。

你能告诉我我做错了什么吗?

如有任何帮助,我们将不胜感激。

提前致谢。

我 运行 docker 使用此命令,我的程序 运行 没有任何错误。但是花了很多时间,不知道是不是Mesos的问题。

Sudo docker run --network host -it ubuntu_mesos_spark_python3.6_oraclient

希望这一点能解决其他人的问题。