AWS ElasticBeantaslk 上的 Sidekiq 未连接到数据库
Sidekiq on AWS ElasticBeantaslk not connecting to DB
我在我的 AWS ElasticBeanstalk 环境中启动 Sidekiq 时遇到问题。
我 运行正在使用我的 Rails 应用程序安装 Sidekiq 4.1.0。
我直接登录到 EC2 实例以手动启动 Sidekiq,当我 运行 这样做时:
bundle exec sidekiq -e staging -q default -q mailers
我从实例中得到这个错误:
2016-02-10T07:19:34.172Z 1655 TID-gn7dktok8 INFO: Booting Sidekiq 4.1.0 with redis options {:url=>"redis://xxxx.amazonaws.com:6379"}
'xxxx.xxxx.rds.amazonaws.com' database is not configured. Available: ["default", "development", "test", "production", "staging"]
我检查了 RDS 数据库 URL 它正在尝试连接,并且它适合我正在尝试 运行 的环境。
我的 sidekiq 配置文件如下所示:
redis_url = ENV['REDIS_URL']
Sidekiq.configure_server do |config|
config.redis = { url: redis_url, namespace: "swimlanes_#{Rails.env}" }
end
Sidekiq.configure_client do |config|
config.redis = { url: redis_url, namespace: "swimlanes_#{Rails.env}" }
end
我什么都试过了。你知道我错过了什么吗?
听起来我帮你找到了 GitHub 上的问题:在某处错误地设置了 Rails 环境?
我在我的 AWS ElasticBeanstalk 环境中启动 Sidekiq 时遇到问题。
我 运行正在使用我的 Rails 应用程序安装 Sidekiq 4.1.0。
我直接登录到 EC2 实例以手动启动 Sidekiq,当我 运行 这样做时:
bundle exec sidekiq -e staging -q default -q mailers
我从实例中得到这个错误:
2016-02-10T07:19:34.172Z 1655 TID-gn7dktok8 INFO: Booting Sidekiq 4.1.0 with redis options {:url=>"redis://xxxx.amazonaws.com:6379"}
'xxxx.xxxx.rds.amazonaws.com' database is not configured. Available: ["default", "development", "test", "production", "staging"]
我检查了 RDS 数据库 URL 它正在尝试连接,并且它适合我正在尝试 运行 的环境。
我的 sidekiq 配置文件如下所示:
redis_url = ENV['REDIS_URL']
Sidekiq.configure_server do |config|
config.redis = { url: redis_url, namespace: "swimlanes_#{Rails.env}" }
end
Sidekiq.configure_client do |config|
config.redis = { url: redis_url, namespace: "swimlanes_#{Rails.env}" }
end
我什么都试过了。你知道我错过了什么吗?
听起来我帮你找到了 GitHub 上的问题:在某处错误地设置了 Rails 环境?