问题描述
在 ECS Fargate 中,当任务失败时,存在停止原因";提供一些有用的日志记录的字段.但是我注意到它在 255 个符号后被截断(下面的屏幕截图).
我检查了网络选项卡并跟踪了 http 响应的 JSON,它甚至在那里被截断(因此是服务器端).有什么办法可以得到完整的消息吗?
我发现这个
我最终在 CloudTrail 中找到了完整的错误消息.我通过用户名"进行搜索,并输入任务 GUID 作为用户名.这缩小了我必须筛选的事件数量.完整的错误消息在GetParameters"文件中.活动.
仅供阅读此答案的任何人使用,任务 GUID 是 taskArn 末尾的 ID,或者如果您在控制台中转到 Task,它将是您在 Task 中看到的 ID:fc0398a94d8b4d4d9218a6d870914a80 –伊曼纽尔·N·K6 月 21 日 13:21
In ECS Fargate, when a task fails, there is a "Stopped Reason" field which gives some useful logging. However I have noticed that it gets truncated after 255 symbols (screenshot below).
I checked the network tab and tracked the JSON of the http response, and it is truncated even there (so server-side). Is there any way to get the complete message?
I find this thread where they discuss the same problem.
How can I see the whole, untruncated error message?
I found the whole error message in CloudTrail eventually. I searched by "Username", and entered the Task GUID as username. This narrowed down the amount of events I had to sift through. The full error message was in a "GetParameters" event.
这篇关于ECS Fargate 中的 StoppedReason 被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!