ECS Fargate 中的 StoppedReason 被截断

StoppedReason in ECS Fargate is truncated

在 ECS Fargate 中,当任务失败时,有一个“停止原因”字段,它提供了一些有用的日志记录。但是我注意到它在 255 个符号后被截断(下面的屏幕截图)。

我检查了网络选项卡并跟踪了 http 响应的 JSON,即使在那里它也被截断了(所以在服务器端)。有什么办法可以得到完整的消息吗?

我发现这个 thread 他们讨论了同样的问题。

如何查看完整的、未截断的错误消息?

我最终在 CloudTrail 中找到了整个错误消息。我按“用户名”搜索,并输入任务 GUID 作为用户名。这缩小了我必须筛选的事件数量。完整的错误消息在“GetParameters”事件中。

Just FYI for anyone who reads this answer the task GUID is the ID at the end of the taskArn or if you go to Task in the console it will be the ID that you see in Task : fc0398a94d8b4d4d9218a6d870914a80 – Emmanuel N K Jun 21 at 13:21