首页 > 解决方案 > AWS Glue 作业运行正确,但返回连接被拒绝错误

问题描述

我正在 AWS 上运行测试作业。我正在从 S3 存储桶读取 CSV 数据,在其上运行 GLUE ETL 作业并将相同的数据存储在 Amazon Redshift 上。GLUE 作业只是从 S3 读取数据并存储在 Redshift 中,无需任何修改。作业运行良好,我在 Redshift 中得到了想要的结果,但它返回了一个我无法理解的错误。

这是错误日志:

18/11/14 09:17:31 WARN YarnClient: The GET request failed for the URL http://169.254.76.1:8088/ws/v1/cluster/apps/application_1542186720539_0001
com.amazon.ws.emr.hadoop.fs.shaded.org.apache.http.conn.HttpHostConnectException: Connect to 169.254.76.1:8088 [/169.254.76.1] failed: Connection refused (Connection refused)

这是一个警告而不是错误,但我想了解导致警告的原因。我试图搜索 WARN 中指示的 IP,但我无法找到具有所述 IP 的机器。

标签: amazon-web-servicesamazon-redshiftaws-glue

解决方案


我注意到我的 AWS Glue 作业中出现了这些错误,因此我发现了一些可以从 AWS 中得到帮助的东西:

This WARN message is not so special, and does not mean job failure or any errors directly. I guess there should be other cause.
I would recommend you to enable continuous logging, and check both driver/executor logs to see if there are any suspicious behavior.
If you enable job bookmark, please try disabling it and see how it goes without bookmark.

https://forums.aws.amazon.com/thread.jspa?messageID=927547

我从一开始就禁用了书签。我检查的是我的 Glue 作业将数据写入 S3 并且每个内存都有一个例外,所以我所做的是重新分区数据。

MyDynamicFrame.coalesce(100).write.partitionBy("month").mode("overwrite").parquet("s3://"+bucket+"/"+path+"/out_data")

所以如果你有一些写操作,我会建议你检查你是如何写到 S3


推荐阅读