The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

360987 (4) [Avatar] Offline
I was following the steps to deploy the docker images to the ECS instance, and at the last step after issuing the command
ecs-cli compose --file docker/common/docker-compose.yml up
I'm getting the following error:

ecs-cli compose --file docker/common/docker-compose.yml up
ERRO[0005] Error listing tasks error="NoCredentialProviders: no valid providers in chain. Deprecated. \n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" request={
Cluster: "spmia-tmx-dev",
DesiredStatus: "RUNNING",
StartedBy: "ecscompose-common"
FATA[0005] NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Please respond with some direction how to solve this issues.
John C Carnell (44) [Avatar] Offline

This is John the author. This looks your AWS credentials are not properly setup on your desktop. Did you run the ecs-cli command passing in the region your ECS container is going to run in, the access key, the secret key and then the cluster you created. (I cover this in Chapter 10, on page 16 on directions for setting this.)

Typically, that error is when the client application does not properly present your aws credentials.

360987 (4) [Avatar] Offline
Got pass that credentials issue. Now I'm having this new issue:

b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/zuulserver STOPPED ecscompose-common:7
b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/licensingservice STOPPED ecscompose-common:7
b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/configserver STOPPED ecscompose-common:7
b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/organizationservice STOPPED ecscompose-common:7
b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/authenticationservice STOPPED ecscompose-common:7
b2a78a2d-c9a4-44b7-90f7-39e4b13c1a3c/kafkaserver STOPPED ecscompose-common:7
e822f4e8-f42a-43f6-b7b0-b65005669c18/organizationservice STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/licensingservice STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/kafkaserver STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/authenticationservice STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/configserver STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/zuulserver STOPPED ecscompose-common:6
e822f4e8-f42a-43f6-b7b0-b65005669c18/eurekaserver STOPPED Reason: CannotPullContainerError: API error (404): manifest for johncarnell/tmx-eurekasvr:TestManualBuild not found

Although this was set up and return TestManualBuild ??
Latifs-MacBook-Pro:common latif_ehi$ echo $BUILD_NAME

Any Ideas what I might be doing wrong.

John C Carnell (44) [Avatar] Offline

What are you attempting to do?

- Are you trying to build the code locally and run and deploy against your own ECS container.
- Are you trying to just deploy using the already built Docker images and deploying to ECS

The error message you are getting is because it trying pull the tmx_eurekaserver out of the johncarnell/tmx-eurekaserver using the TESTMANUALBUILD tag. That tag does not exist in my Docker repo.

The TESTMANUALBUILD tag was meant for example purposes only. What you might want to do is= set your environment variable BUILD_NAME to be 20170513183945-13. That is the last build I did on chapter 10 and you should be able to pull all of your docker images based off that build name. For example:

export BUILD_NAME="20170513183945-13" ; OS X and Linux

After you have done that you could try your deploy then. Let me know if that works. Chapter 10 has a lot of moving parts smilie

360987 (4) [Avatar] Offline
Thanks for replying. I'm trying to just deploy using the already built Docker images and deploying to ECS .

I do see the images under docker ps. But when I try to deploy with the command : ecs-cli compose --file docker/common/docker-compose.yml up

this is what I get ? All images are stopped ???

ba9dece0-b969-4d52-b776-b7845f6e789a/authenticationservice STOPPED ecscompose-common:13
e534c820-8cc3-4f51-8fbf-a577002c502c/zuulserver STOPPED ecscompose-common:12
e534c820-8cc3-4f51-8fbf-a577002c502c/eurekaserver STOPPED Reason: CannotPullContainerError: API error (404): manifest for johncarnell/tmx-eurekasvr:20170513183945-13 not found
e534c820-8cc3-4f51-8fbf-a577002c502c/organizationservice STOPPED ecscompose-common:12
e534c820-8cc3-4f51-8fbf-a577002c502c/licensingservice STOPPED ecscompose-common:12
e534c820-8cc3-4f51-8fbf-a577002c502c/kafkaserver STOPPED ecscompose-common:12
e534c820-8cc3-4f51-8fbf-a577002c502c/configserver STOPPED ecscompose-common:12
e534c820-8cc3-4f51-8fbf-a577002c502c/authenticationservice STOPPED ecscompose-common:12
John C Carnell (44) [Avatar] Offline

Try this. I gave you the wrong tag. The part I sent you was only the date time set on the tag name and not the full tag name itself.
Set your BUILD_NAME to be chapter10-master-20170513183945-13

export BUILD_NAME="chapter10-master-20170513183945-13"

If that doesn't work let me know and I will set up my AWS environment tonight and see if I can reproduce the problem.

Also remember that you are not pulling these off your locally running Docker hub. Amazon will try to pull these from DockerHub (

360987 (4) [Avatar] Offline
That was it. Thank you. I hope this will help others when they face this issue. BTW , great book and explanations. Are you working on different books ?
John C Carnell (44) [Avatar] Offline

I appreciate the patience. Glad you like the book. It was a lot of hard work, but I kept getting great reader feedback so it made the process a lot easier. This is my first book in about 10 years. I am not working on any other books right now, but depending on how this one goes, my wife will let me write another one smilie

321488 (6) [Avatar] Offline
When I read the first part of this chapter I could not understand how the images I had just built using mvn locally on my machine got to AWS when the ecs-cli compose was run. It seems there is missing explanation that they actually don't, and can't. I got the error above and then spent some time going deeper to understand. The text describes what you John did prior to somehow magically moving them to DockerHub.YOU never really explain the relationship between WAWS and Docker Hub, how does ECS know about Docker Hub ? I now know how this works, you did a manual push, but was really confused on reading. This chapter is very confusing. I think the text needs some explanation of how you use DockerHub at the start of the book, and its relationship with AWS. Would appreciate this in the addendum.

Also in the discussion above, doing the mvn build will not result in seeing the image in local docker via kitematics... Think the text needs to explain how to get from the mvn built image to the one deployed on ECS, manually although the shell scripts used by TRAVIS do meet this goal, although too late, for the reader.

Despite this comment, John, this is an excellent book, and is the first time I have managed to stay tuned with a compete 'programming' book running stuff from beginning to end and then just adding more myself. There is so much more to the Spring Cloud framework and there is easily another 2 books there...
John Carnell (26) [Avatar] Offline

Hey I appreciate your comments. It is a fair and honest assessment. Couple of things:

1. I reviewed the text. I do explicitly call out the pushing of the image to Docker hub. I do call out the starting of the ecs-compose. However, per your observation I do not
mention anywhere that ECS is pulling the image from the central docker hub. So your right, it does look a little bit like magic. I'll chat with my editors. I can either put
together a quick blog post or set something in the errata to help try to connect the dots.

2. Part of the challenge with Chapter 10 is there are a lot of moving pieces in the chapter. One of my concerns early on was the number of steps involved with the process.
In retrospect, I probably should have split the chapter 2 two. One chapter on deploying manually on AWS and then building a deployment pipeline using Travis CI. Its
always a tough call when it comes to scoping material
I thought this would be one of my easier chapters to write.

3. Everything in the chapter is meant to be run from travis. The maven execution was meant to be run in the context of travis. I probably could have made that more
explicit in the beginning chapter.

4. Appreciate the kind comments on the book. One of the things I really wanted to be conscious of was the scope of the book. I wanted something that was very digestable.
I did not want this book to be a "everything and a kitchen sink" book and end up with it being massive. I love my Groovy In Action book, but I would have gladly taken a
smaller book in exchange for the material sooner smilie

When I started the book, the Spring Cloud framework was actually smaller then it was by the time I was done. I could easily add chapters now on monitoring, consul and
the new Spring dataflow language for REST service orchestration. Again a lot of this was struggling with keeping the book scoped and focused. There is a lot of
material you can talk about around
microservices that I did not cover in great detail (patterns, testing, etc....) There might be some of this if I get the opportunity to write a second edition of this book in the
future. Again though scoping is always a challenge.

Thanks for purchasing the book. When I get an email like yours, the highest praise I can get is that you took the time to read it from beginning to end and got value out of it. It makes the time I spent on it very much worth it. If you are inclined, I always appreciate a review on Amazon.