Step 6: Update ECS Service times out #4
Comments
Hey @niiamon, I ran into this same thing. For me, the issue turned out to be that the EC2 node running the ECS agent didn't have the appropriate Dockerhub authentication set up on it to download my image. If you SSH into your EC2 node(s) and Here's Amazon's page on how to correct that: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html (Though I agree, error reporting on this one could be far better) |
@TomFrost Fortunately, I have the required setup and my ecs.config is pulled in from an S3 bucket. I've been tailing the ecs-agent logs at /var/log/ecs and Iv'e spotted this:
The question is what resource is it talking about? A port? Debugging some more and will report back here with what I find. |
Unfortunately, ECS does not have the ability to put two of the same tasks on the same machine if they expose the same port -- or for that matter, two different tasks that expose the same port. You'll also see that message if you don't have a machine in the cluster with enough RAM or CPU according to your task definition. |
@TomFrost You're indeed right. The error wasn't a consistent but more sporadic in nature. So I had some previous tasks which had failed booting up and the agent kept trying to bring them up and since all the tasks were using the same port, that happened. Got that sorted. I am now deciding how best to expose environment variables from wercker to the docker image that gets pushed to Docker Hub. Any ideas? |
@niiamon Ideally the
"environment": [
{ "name": "APP_ENVIRONMENT", "value": "production" },
{ "name": "LOG_LEVEL", "value": "warn" }
] but you could replace those values with placeholders like this: "environment": [
{ "name": "APP_ENVIRONMENT", "value": "%APP_ENVIRONMENT%" },
{ "name": "LOG_LEVEL", "value": "%LOG_LEVEL%" }
] and then, before your ecs deployment, add a The latter is more complex, but certainly cleaner from the standpoint of being able to use the same container in your docker repository in different environments. |
I chose the second approach and it works quite well. Many thanks for the help @TomFrost 😄 |
First got this:
Command timed out after no response
Then this after I increased no-response-timeout:
Step 6: Update ECS Service
✖ Waiter ServicesStable failed: Max attempts exceeded
The text was updated successfully, but these errors were encountered: