codeDeployでrailsのアプリケーションがデプロイ出来なくなった。
状況
- amazon Linux
- ruby 2.3.1
- aws-sdk-core 2.6.3
$ sudo yum info codedeploy-agent
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages
Name : codedeploy-agent
Arch : noarch
Version : 1.0
Release : 1.1037
Size : 9.4 M
Repo : installed
From repo : /codedeploy-agent-1.0-1.1037.noarch.tmp-20161013-7770-7wuth6
Summary : Provides the required files for CodeDeploy agent to run in EC2 instances
License : Amazon.com Internal
Description : CodeDeploy instance agent is responsible for doing the actual work of deploying software
: on an EC2 instance.
ログをみるとcodedeploy-agentが動いている間ずっと以下エラーを繰り返し吐いていた
/var/log/aws/codedeploy-agent/codedeploy-agent.log
2016-10-13 11:12:19 ERROR [codedeploy-agent(27845)]: Plugin codedeploy could not be loaded: Unable to activate codedeploy-commands-1.0.0, because aws-sdk-core-2.6.3 conflicts with aws-sdk-core (~> 2.3.0).
2016-10-13 11:12:19 ERROR [codedeploy-agent(27845)]: Plugin codedeploy could not be loaded: Unable to activate codedeploy-commands-1.0.0, because aws-sdk-core-2.6.3 conflicts with aws-sdk-core (~> 2.3.0).
2016-10-13 11:12:19 ERROR [codedeploy-agent(27845)]: booting child: error during start or run: Gem::ConflictError - Unable to activate codedeploy-commands-1.0.0, because aws-sdk-core-2.6.3 conflicts with aws-sdk-core (~> 2.3.0) - /usr/local/rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2284:in `raise_if_conflicts'
/usr/local/rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1407:in `activate'
/usr/local/rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems.rb:196:in `rescue in try_activate'
・
・
対処したけどダメ
- codedeploy-agentの再起動
- gem cleanup
対処できた方法
- bundle exec gem uninstall aws-sdk-core
- bundle install で再度aws-sdk-coreをインストール
原因
まだ良くわからない