如何對 Amazon EMR 筆記本的連線問題進行疑難排解?

2 分的閱讀內容
0

我想要針對 Amazon EMR 筆記本的連線問題進行疑難排解。

簡短說明

與 Amazon EMR 筆記本連線時,您可能會收到類似下列內容的錯誤:

  • Workspace (notebook) is stopped.Internal Error. (工作區 (筆記本) 已停止。內部錯誤。)
  • Workspace (notebook) can now be used in local mode. (工作區 (筆記本) 現在可以在本機模式下使用。)
  • Notebook is stopped.Service Role does not have the required permissions. (筆記本已停止。服務角色沒有所需的許可。)
  • Notebook is stopped.Notebook security group sg-xxxxxxxx does not have an egress rule to connect with the master security group sg-yyyyyy.Please fix the security group or use the default option. (筆記本已停止。筆記本安全群組 sg-xxxxxxxx 沒有與主安全群組 sg-yyyyyy 連線的傳出規則。請修正安全群組或使用預設選項。)
  • Notebook is stopped.Notebook security group sg-xxxxxxx should not have any ingress rules.Please fix the security group or use the default option. (筆記本已停止。筆記本安全群組 sg-xxxxxxx 不應有任何傳入規則。請修正安全群組或使用預設選項。)

解決方案

查看 EMR 筆記本中的服務角色

1.    驗證筆記本的 AWS Identity and Access Management (IAM) 角色是否具有所需的最低許可。如需詳細資訊,請參閱 Service role for EMR notebooks (EMR 筆記本的服務角色)。

2.    確認筆記本是否具有 AmazonElasticMapReduceEditorsRole 中包含的所有許可。使用 AWS 受管政策 S3FullAccessPolicy 可完整存取 Amazon Simple Storage Service (Amazon S3)。如需詳細資訊,請參閱 AWS managed policy: Amazon S3FullAccess (AWS 受管政策:Amazon S3FullAccess)。

3.    從 S3 儲存貯體 (筆記本所在之處) 附加的儲存貯體政策中移除所有許可限制。

查看 EMR 筆記本中的安全群組

1.    驗證用於筆記本的安全群組至少具有所需的最基本規則。如需詳細資訊,請參閱 Specifying EC2 security groups for EMR notebooks (指定 EMR 筆記本的 EC2 安全群組)。

2.    最佳實務是針對 EMR 叢集和 EMR 筆記本使用不同的安全群組。筆記本和叢集的安全群組各有不同的傳入和傳出規則要求。

筆記本安全群組 ElasticMapReduceEditors-Editor 有一個傳出規則可與主安全群組 ElasticMapReduceEditors-Livy 連線。此連線使用的是 tcp/18888。移除筆記本安全群組 ElasticMapReduceEditors-Editor 路由至 0.0.0.0/0 的任何新增傳出規則。

主安全群組 ElasticMapReduceEditors-Livy 有一個傳入規則可與筆記本安全群組 ElasticMapReduceEditors-Editor 連線。此連線使用的是 tcp/18888。移除主安全群組 ElasticMapReduceEditors-Livy 路由至 0.0.0.0/0 的任何新增傳入規則。

EMR 叢集要求

1.    確認連接的叢集相容且符合所有叢集要求

2.    開啟 Livy 模擬功能後,確認 EMR 叢集主節點上是否正在執行 hadoop-httpfs

使用下面的命令來檢查 hadoop-httpfs 的狀態:

$ sudo systemctl status hadoop-httpfs

使用下面的命令來開啟 hadoop-httpfs

$ sudo systemctl start hadoop-httpfs

AWS 官方
AWS 官方已更新 1 年前