AWS青苗工人无法启动SQS守护AWS

编程入门 行业动态 更新时间:2024-10-27 22:28:19
本文介绍了AWS青苗工人无法启动SQS守护AWS-sqsd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的目标是使用AWS的魔豆,创造应用环境型工人,它将处理高负荷的任务,这名工人的基础上我们的Rails应用程序。 我创建AWS魔豆工人环境: 环境梯队:红宝石,1.9.3在64位Linux的亚马逊 环境类型:单实例 (我也尝试64位的亚马逊的Linux 2014.03 V1.0.3具有同样的失败结果运行的Ruby 2.0(彪马))

My target is using AWS Beanstalk, create application environment type 'Worker' which will handle heavy loading tasks, this worker based on our Rails application. I create AWS Beanstalk Worker Environment: Environment tier: Ruby, 1.9.3 on 64bit Amazon Linux Environment type: single instance (i did try 64bit Amazon Linux 2014.03 v1.0.3 running Ruby 2.0 (Puma) with same failed result)

解决所有的问题,GEMS和数据库连接后,我卡在启动AWS-SQS队列客户端。它应该听队列,但HTTP请求到工人的应用程序。 我已经提供AWS_ACCESS_KEY_ID和AWS_SECRET_KEY以ENV变量这名工人例如:

After solving all issues with GEMS and database connection, i stuck on starting "aws-sqs" Queue client. It should listen Queue and do HTTP requests to Worker application. I've provide AWS_ACCESS_KEY_ID and AWS_SECRET_KEY to ENV variables for this Worker instance:

$ export | grep AWS declare -x AWS_ACCESS_KEY_ID="AK...........Q" declare -x AWS_AUTO_SCALING_HOME="/opt/aws/apitools/as" declare -x AWS_CLOUDWATCH_HOME="/opt/aws/apitools/mon" declare -x AWS_ELB_HOME="/opt/aws/apitools/elb" declare -x AWS_IAM_HOME="/opt/aws/apitools/iam" declare -x AWS_PATH="/opt/aws" declare -x AWS_RDS_HOME="/opt/aws/apitools/rds" declare -x AWS_SECRET_KEY="Hp.....fI" declare -x EB_CONFIG_SYSTEM_AWSEBAGENTID="" declare -x EB_CONFIG_SYSTEM_AWSEBREFERRERID=""

下面是日志输出:

2014-05-19T13:58:59Z init: initializing aws-sqsd 1.0 (2013-12-23) 2014-05-19T13:58:59Z start: polling sqs.us-east-1.amazonaws/201266939336/awseb-e-dq8cqaud2z-stack-AWSEBWorkerQueue-18836XBBHNDUD 2014-05-19T13:58:59Z fatal: AWS::Errors::MissingCredentialsError: Missing Credentials. Unable to find AWS credentials. You can configure your AWS credentials a few different ways: * Call AWS.config with :access_key_id and :secret_access_key <<< * On EC2 you can run instances with an IAM instance profile and credentials will be auto loaded from the instance metadata service on those instances. * Call AWS.config with :credential_provider. A credential provider should either include AWS::Core::CredentialProviders::Provider or respond to the same public methods. = Ruby on Rails In a Ruby on Rails application you may also specify your credentials in the following ways: * Via a config initializer script using any of the methods mentioned above (e.g. RAILS_ROOT/config/initializers/aws-sdk.rb). * Via a yaml configuration file located at RAILS_ROOT/config/aws.yml. This file should be formated like the default RAILS_ROOT/config/database.yml file.

另外我有配置/初始化/ AWS-sdk.rb在我与此内容Rails应用程序:

Also i have config/initializers/aws-sdk.rb in my Rails application with this content:

AWS.config( access_key_id: ENV["AWS_ACCESS_KEY_ID"], secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"])

守护AWS-SQS根本不启动。 我可以有机会配置AWS-SQS以其他方式?

Daemon aws-sqs don't started at all. May i have chance to configure aws-sqs in some other way?

推荐答案

您正在使用的弹性魔豆不具备所需要的工人环境的权限也许实例配置文件。

Perhaps the instance profile you are using for your Elastic Beanstalk does not have the permissions needed for worker environments.

docs.aws.amazon/elasticbeanstalk/latest/dg/AWSHowTo.iam.roles.aeb.html#AWSHowTo.iam.policies.actions.worker

您可以确保您的IAM实例配置文件在上面的链接中列出的所有权限? (复制以下供参考)

Can you make sure your IAM Instance profile has all permissions listed in the link above? (Copied below for reference)

{ "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": "*" } ] }

更多推荐

AWS青苗工人无法启动SQS守护AWS

本文发布于:2023-11-24 01:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623465.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:青苗   无法启动   工人   AWS   SQS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!