在Mac上打开一个端口,用于本地运行的火花
我在Mac上通过Brew安装的Mac在本地运行独立的Spark 3.2.1。这是用于低成本(免费)单位测试的目的。我正在通过终端的Pyspark命令启动此实例,并能够访问实例Web UI。
我还试图在本地运行Spark-Submit(从同一MAC)运行上述Pyspark实例上的Pyspark脚本。指定-Master:7077时,我会遇到“连接拒绝”错误。它看起来不像我的Mac上的端口7077打开。
如何在Mac上打开端口7077,以便可以通过Spark-Submit从Mac访问它,但是同一网络上的其他机器不能?
有人可以通过解释分享明确的步骤吗?
非常感谢:) 迈克尔
I am running a stand-alone Spark 3.2.1 locally, on my mac, installed via brew. This is for low-cost (free) unit testing purposes. I am starting this instance via pyspark command from terminal and able to access the instance web ui.
I am also trying to run spark-submit locally (from the same mac) to run a pyspark script on the pyspark instance described above. When specifying the --master :7077 I am getting the "connection refused" error. It does not look like the port 7077 is open on my mac.
How do I open the port 7077 on my mac such that I can access it from my mac via spark-submit, but other machines on the same network cannot?
Could someone share clear steps with explanations?
Much appreciated :)
Michael
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查您的Spark Master进程正在运行。
必须像遵循输出一样。
如果火花过程未运行,
首先在外壳中运行脚本
$ spark_home/sbin/start-master.sh
。另外
$ spark_home/sbin/start-worker.sh
。然后检查使用以下命令在7077端口上侦听过程。
sudo lsof -np -I:7077 | GREP收听
Check your spark master process is running.
It must be like following output.
If spark process is not running,
run script
$SPARK_HOME/sbin/start-master.sh
in your shell first.also
$SPARK_HOME/sbin/start-worker.sh
.and then check if process listen on 7077 port with following command.
sudo lsof -nP -i:7077 | grep LISTEN