工作程序启动时出现 Elastic Beanstalk SQSD 错误 [英] Elastic Beanstalk SQSD Error on worker start

查看:33
本文介绍了工作程序启动时出现 Elastic Beanstalk SQSD 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署了一个 nodejs worker.但是,每当我尝试启动它时,它都会变红并显示此错误:错误实例:i-6eef007a 模块:AWSEBAutoScalingGroup ConfigSet:null 命令在实例上失败.返回码:1 输出:构建期间发生错误:命令 01-start-sqsd 失败.

I've deployed a nodejs worker. However whenever I try to start it, it gets red and this error is showned: ERROR Instance: i-6eef007a Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01-start-sqsd failed .

我不知道是否相关,有时我会在屏幕上看到这个错误:IamInstanceProfile:环境没有关联的 IAM 实例配置文件.为了提高部署速度,请将 IAM 实例配置文件与环境相关联.

I don't know if it's related, sometimes I get this error on the screen: IamInstanceProfile: The environment does not have an IAM instance profile associated with it. To improve deployment speed please associate an IAM instance profile with the environment.

我已经向 SQS 授予了权限并设置了密钥和机密.我不知道还能做什么.

I've already given permission to SQS and set key and secret. I don't know what else to do.

附上日志.

非常感谢.

推荐答案

您需要具有适当权限的 IAM 角色才能创建 Elastic Beanstalk 工作线程环境.

You need to have an IAM role with the appropriate permissions to create an Elastic Beanstalk worker environment.

IAM 角色应具有以下权限:

The IAM role should have the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "QueueAccess",
      "Action": [
        "sqs:ChangeMessageVisibility",
        "sqs:DeleteMessage",
        "sqs:ReceiveMessage"
      ],
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Sid": "MetricsAccess",
      "Action": [
        "cloudwatch:PutMetricData"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}               

详细文档:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.roles.aeb.html#AWSHowTo.iam.policies.actions.worker

为了调试,您可以通过 ssh 连接到实例并查看/var/log/aws-sqsd/default.log 以查看日志.如果您想避免通过 ssh 连接到实例,您还可以从 AWS 控制台对日志进行快照,如下所示 此处.

For debugging you can ssh to the instance and look at /var/log/aws-sqsd/default.log to see the logs. If you want to avoid ssh'ing to the instance you can also snapshot logs from the AWS Console as shown here.

您可以阅读有关工作角色环境的更多信息 这里.

You can read more about worker role environments here.

这篇关于工作程序启动时出现 Elastic Beanstalk SQSD 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆