1

I have a EC2 + EFS + ECS setup on which I run a few docker containers. My EC2 instance died, and a new one spun up, but when starting the tasks on the new instance, I get the following error message

error looking up volume plugin amazon-ecs-volume-plugin: plugin "amazon-ecs-volume-plugin" not found

What have I missed in my EC2 launch configuration since it cannot find this plugin? Googling the plugin name gives no hints at all.

plazm
  • 13
  • 4

1 Answers1

0

Run your EC2 instances with the latest ECS-optimized AMI or stop upgrading whole yum packages.

I had faced same issue, and I found a mismatch of ecs-init version in troubled container instances. The originally installed is 1.37.0 but used at the time was 1.39.0. Since ecs-init 1.38.0, it has "ecs-volume-plugin" feature, but it seems not to work well only upgrading installed packages with old AMI.

So I tried to stop upgrading whole packages within user data. I fixed my user data as shown below.

before:

#cloud-config
repo_update: true
repo_upgrade: all

after:

#cloud-config
repo_update: true
repo_upgrade: security # the default is "security"

see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html#security-updates

And now my ECS tasks are running well. Also it works well through upgrading AMI.

Azmin
  • 16
  • Thank you so much - that was not very obvious - I have started so many containers, and suddenly it didn't work! – plazm Apr 30 '20 at 19:19