【问题标题】:Trying to do remote debugging an Spark app: java.io.IOException "handshake failed - connection prematurally closed尝试远程调试 Spark 应用程序:java.io.IOException "handshake failed - connection prematurally closed
【发布时间】:2019-01-17 20:19:17
【问题描述】:

我正在尝试通过 AWS EC2 机器远程调试 spark 应用程序。

我已经建立了一个 ssh 隧道,使用:

ssh -i $HOME/pem/dev/dna-dev.pem -N -D 5005 hadoop@10.121.8.132

然后将正确的参数添加到我的 spark-submit 命令中:

spark-submit --driver-java-options -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 --class org.sergio.dna.poc.TestEngine   --master yarn   --deploy-mode client   --executor-memory 2G   --num-executors 1 --executor-cores 1  DNA-Sergio-PoC-1.0-SNAPSHOT.jar

最后在 Intellij 中通过端口 5005 创建远程调试配置

spark-submit 命令说它正在等待

Listening for transport dt_socket at address: 5005

但是当我运行远程调试时,Intellij 说:

Error running 'RemoteTest': Unable to open debugger port (localhost:5005): java.io.IOException "handshake failed - connection prematurally closed"

我缺少任何配置吗?我已经在 cloudera 集群中做到了这一点,它运行良好,但我是 AWS 的新手,我想知道我是否在服务器端遗漏了一些东西

谢谢

【问题讨论】:

    标签: scala apache-spark intellij-idea amazon-ec2


    【解决方案1】:

    最后我不需要 ssh 隧道。只需在 EMR 控制台 -> 安全组 -> 主集群 -> 入站,在我的情况下为 5005 中打开“所有流量”的端口。

    然后在您的 intellij 远程调试配置中使用您的 EMR IP 更改“localhost”。

    它已经完成了。

    【讨论】:

      猜你喜欢
      • 2018-06-06
      • 2020-03-02
      • 2017-03-23
      • 2010-11-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-31
      相关资源
      最近更新 更多