Cluster not found: amazon-ecs-plugin bug or misconfiguration?

357 views
Skip to first unread message

Costin Caraivan

unread,
Sep 26, 2017, 8:10:34 AM9/26/17
to jenkins...@googlegroups.com
Hello,

I'm trying to set up the amazon-ecs-plugin to connect to a ECS cluster. However, after configuring both the cluster itself and the plugin, both apparently correctly, I'm getting an error I don't really understand:

INFO: Started provisioning ECS Slave docker from aws-ecs with 1 executors. Remaining excess workload: 0
Sep 26, 2017 12:32:48 PM hudson.slaves.NodeProvisioner$2 run
WARNING: Unexpected exception encountered while provisioning agent ECS Slave docker
com.amazonaws.services.ecs.model.ClusterNotFoundException: Cluster not found. (Service: AmazonECS; Status Code: 400; Error Code: ClusterNotFoundException; Request ID: f7bc84e2-a2a5-11e7-801f-1bbc4489a697)

The error makes no sense as the plugin does autodetect the cluster and fills it in the dropdown in the Manage Jenkins interface (so there's no manual input error possible...).

Does anyone have any idea what I should check/debug/investigate?

I can provide more info about the setup, just tell me what would help.


I was thinking about a workaround of using a "regular" Docker plugin, but I'm not super confident about it after seeing this:

https://github.com/jenkinsci/docker-plugin/issues/235#issuecomment-147975445

Is anyone using one of the Docker plugins for agents in production, and if so, are you happy with it/them? When I say production, I mean something preferably with tens if not hundreds of jobs configured :)


Kind regards,
_____________
Costin Caraivan

Ian Price

unread,
Sep 6, 2018, 3:04:09 PM9/6/18
to Jenkins Users
Check that you have logged in to ECR.  From the AWS console go to the ECS service and click on Repositories. Click on an individual repo and click on View Push Commands 

The command you want is aws ecr get-login --no-include-email --region <region name of the repos>

Run the docker command it provides: docker login -u AWS -p xxxx.....xxxxx

If you get Login Succeeded then the rest should work    

Ian Price

unread,
Sep 7, 2018, 4:02:42 AM9/7/18
to Jenkins Users
Actually run $(aws ecr get-login --no-include-email --region <region name of the repos>) and you won't have to cut and paste the reply
Reply all
Reply to author
Forward
0 new messages