在Mac上打开一个端口,用于本地运行的火花

发布于 2025-02-03 16:33:00 字数 322 浏览 4 评论 0原文

我在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里人 2025-02-10 16:33:01

检查您的Spark Master进程正在运行。

必须像遵循输出一样。

jps

$PID Master
$PID Worker

如果火花过程未运行,
首先在外壳中运行脚本$ 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.

jps

$PID Master
$PID Worker

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文