[英]AWS X-RAY [Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain. Deprecated
I'm using X-Ray Daemon with Fargate.我正在使用带有 Fargate 的 X-Ray 守护程序。 Unfortunately in the logs of the daemon I see errors like:
不幸的是,在守护进程的日志中,我看到如下错误:
[Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain.
[错误] 发送分段批处理失败:NoCredentialProviders:链中没有有效的提供者。 Deprecated.
已弃用。 For verbose messaging see aws.Config.CredentialsChainVerboseErrors Warn] Delaying sending of additional batches by 0 seconds
有关详细消息,请参阅 aws.Config.CredentialsChainVerboseErrors Warn] 将额外批次的发送延迟 0 秒
AWS X-Ray works with IAM: permission: AWSXrayFullAccess AWS X-Ray 与 IAM 一起使用:权限:AWSXrayFullAccess
I already checked:我已经检查过:
{
"name" : "xray-daemon",
"image" : "amazon/aws-xray-daemon",
"user" : "1337",
"essential" : true,
"cpu" : "32",
"memoryReservation" : "256",
"portMappings" : [
{
"containerPort" : 2000,
"protocol" : "udp"
}
]
}
],
"requiresCompatibilities" : [ "FARGATE" ],
"taskRoleArn" : "arn:aws:iam::123456789012:role/ecsTaskRole",
"executionRoleArn" : "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"networkMode" : "awsvpc"
}
You should check you role permissions role, I used the same for execution & taskRoleArn.您应该检查您的角色权限角色,我使用相同的执行和 taskRoleArn。 my role contained these policies
我的角色包含这些政策
and also check trust relationships for role.并检查角色的信任关系。 my used:
我用过的:
I got this error when my version of the x-ray deamon was old.当我的 X 射线守护程序版本较旧时出现此错误。
Follow this as guidance to update your x-ray deamon if it is running on ECS:如果 X 射线守护程序在 ECS 上运行,请按照以下指南更新您的 X 射线守护程序:
https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html
XRay daemon is missing credentials needed to authenticate with XRay server. XRay 守护程序缺少向 XRay 服务器进行身份验证所需的凭据。 You can pass credentials to XRay daemon in several ways, but the most common are:
您可以通过多种方式将凭据传递给 XRay 守护程序,但最常见的是:
I'm guessing option 1 will be easier with fargate.我猜选项 1 使用 fargate 会更容易。
Of course you need to generate the key in IAM, see: https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html当然需要在IAM中生成密钥,参见: https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html
The user you'll create the access key for will need to have permissions to use XRay (AWSXrayFullAccess should do).您将为其创建访问密钥的用户需要具有使用 XRay 的权限(AWSXrayFullAccess 应该这样做)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.