kbastani / spring-cloud-microservice-example

An example project that demonstrates an end-to-end cloud native application using Spring Cloud for building a practical microservices architecture.
http://www.kennybastani.com/2015/07/spring-cloud-docker-microservices.html
GNU General Public License v3.0
176 stars 135 forks source link

Failed to execute goal com.spotify:docker-maven-plugin unauthorized: authentication required #44

Closed dchucks closed 7 years ago

dchucks commented 7 years ago

I am sorry if this is a Docker newbie question. I am using Docker Toolbox with VirtualBox (as Hyper-V is not supported on my HP Laptop having Win Home edition OS). When I run the mvn clean installcommand I get error on the "users-microservice" and rest all Microservice build are therefore skipped. I am sure I must be doing something silly here, would appreciate your help.

[INFO] spring-cloud-microservice-example-parent ........... SUCCESS [  1.114 s]
[INFO] users-microservice ................................. FAILURE [20:28 min]
[INFO] discovery-microservice ............................. SKIPPED
[INFO] api-gateway-microservice ........................... SKIPPED
[INFO] recommendation-microservice ........................ SKIPPED
[INFO] config-microservice ................................ SKIPPED
[INFO] hystrix-dashboard .................................. SKIPPED
[INFO] consul-microservice ................................ SKIPPED
[INFO] movie-microservice ................................. SKIPPED
[INFO] movies-ui .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20:32 min
[INFO] Finished at: 2017-02-03T20:09:09+05:30
[INFO] Final Memory: 70M/513M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default) on project users-microservice: Exception caught: unauthorized: authentication required -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :users-microservice
dchucks commented 7 years ago

This somehow got sorted out (I added the Server details of Docker Hub, as discussed in this stackoverflow thread) and the build worked. However, I was unable to have Docker compose spawn all the containers for me, but that perhaps is another topic and needs further work from me.

dchucks commented 7 years ago

By increasing the memory allocated to VMs to 5GB (as already suggested in the article) I was able to run all the services in their containers. Kudos! Now to studying the code on all this magic. Many thanks.