简体   繁体   English

AWS X-RAY [错误] 发送分段批处理失败,原因是:NoCredentialProviders:链中没有有效的提供程序。 已弃用

[英]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我的角色包含这些政策

  • arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
  • arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
  • arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
  • arn:aws:iam::aws:policy/AWSXRayFullAccess arn:aws:iam::aws:policy/AWSXRayFullAccess

and also check trust relationships for role.并检查角色的信任关系。 my used:我用过的:

  • ecs-tasks.amazonaws.com ecs-tasks.amazonaws.com
  • ecs.amazonaws.com ecs.amazonaws.com
  • c2.amazonaws.com c2.amazonaws.com

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 守护程序,但最常见的是:

  1. through environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY通过环境变量 AWS_ACCESS_KEY_ID 和 AWS_SECRET_ACCESS_KEY
  2. through ~/.aws/credentials file (see https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html )通过 ~/.aws/credentials 文件(参见https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

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.

相关问题 NoCredentialProviders:链中没有有效的提供者。 已弃用。 (DNS 控制) - NoCredentialProviders: no valid providers in chain. Deprecated. (DNSControl) 带有 IAM 的 EC2 上的 S3:错误 NoCredentialProviders:链中没有有效的提供者。 已弃用 - S3 on EC2 with IAM: Error NoCredentialProviders: no valid providers in chain. Deprecated 获取错误'NoCredentialProviders:链中没有有效的提供者。 已弃用。 在 golang 中调用 acmpca.GetCertificate() - Getting Error 'NoCredentialProviders: no valid providers in chain. Deprecated.' while calling acmpca.GetCertificate() in golang 错误:NoCredentialProviders:链中没有有效的提供者。 已弃用。 脱水工具错误 - Error: NoCredentialProviders: no valid providers in chain. Deprecated. error with dehydrated tool Amazon SQS:: 尝试创建队列时出错:NoCredentialProviders:链中没有有效的提供商。 弃用 - Amazon SQS:: Got an error while trying to create queue: NoCredentialProviders: no valid providers in chain. Deprecated 带有Docker容器的AWS Cloudwatch日志-NoCredentialProviders:链中没有有效的提供商 - AWS Cloudwatch logs with Docker Container - NoCredentialProviders: no valid providers in chain 使用 AWS-SDK-GO 时出错(NoCredentialProviders:链中没有有效的提供者) - Error when using AWS-SDK-GO (NoCredentialProviders: no valid providers in chain) NoCredentialProviders:使用 AWS S3 的电子更新程序中的链错误中没有有效的提供者 - NoCredentialProviders: no valid providers in chain error in electron-updater with AWS S3 错误:FATAL NoCredentialProviders:链中没有有效的提供者,原因是:EnvAccessKeyNotFound: - Error: FATAL NoCredentialProviders: no valid providers in chain caused by: EnvAccessKeyNotFound: 注册错误:NoCredentialProviders: no valid providers in chain ECS 代理错误 - Error registering: NoCredentialProviders: no valid providers in chain ECS agent error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM