Each service is built and deployed using Docker. End-to-end integration testing can be done on a developer's machine using Docker compose.
Polyglot Persistence
One of the core concepts of this example project is how polyglot persistence can be approached in practice. Microservices in the project use their own database, while integrating with the data from other services through REST or a message bus.
Neo4j (graph)
MongoDB (document)
MySQL (relational)
Movie Recommendations
This example project focuses on movies and recommendations.
Data Services
Domain Data
Microservice architecture
This example project demonstrates how to build a new application using microservices, as opposed to a monolith-first strategy. Since each microservice in the project is a module of a single parent project, developers have the advantage of being able to run and develop with each microservice running on their local machine. Adding a new microservice is easy, as the discovery microservice will automatically discover new services running on the cluster.
Service discovery
This project contains two discovery services, one on Netflix Eureka, and the other uses Consul from Hashicorp. Having multiple discovery services provides the opportunity to use one (Consul) as a DNS provider for the cluster, and the other (Eureka) as a proxy-based API gateway.
API gateway
Each microservice will coordinate with Eureka to retrieve API routes for the entire cluster. Using this strategy each microservice in a cluster can be load balanced and exposed through one API gateway. Each service will automatically discover and route API requests to the service that owns the route. This proxying technique is equally helpful when developing user interfaces, as the full API of the platform is available through its own host as a proxy.
License
This project is an open source product licensed under GPLv3.
[INFO] --- docker-maven-plugin:0.4.13:build (default) @ users-microservice ---
[WARNING] Error injecting: com.spotify.docker.BuildMojo
java.lang.NoClassDefFoundError: Lcom/fasterxml/jackson/databind/ObjectMapper;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:675)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:164)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:613)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:569)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:555)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:884)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:805)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:282)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:214)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1006)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1038)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1001)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:517)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 58 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] spring-cloud-microservice-example-parent ........... SUCCESS [ 0.490 s]
[INFO] users-microservice ................................. FAILURE [ 6.041 s]
[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: 8.132 s
[INFO] Finished at: 2016-12-23T01:47:12+08:00
[INFO] Final Memory: 64M/368M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default) on project users-microservice: Execution default of goal com.spotify:docker-maven-plugin:0.4.13:build failed: A required class was missing while executing com.spotify:docker-maven-plugin:0.4.13:build: Lcom/fasterxml/jackson/databind/ObjectMapper;
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.spotify:docker-maven-plugin:0.4.13
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/xiangyue/.m2/repository/com/spotify/docker-maven-plugin/0.4.13/docker-maven-plugin-0.4.13.jar
[ERROR] urls[1] = file:/Users/xiangyue/.m2/repository/com/spotify/docker-client/5.0.1/docker-client-5.0.1-shaded.jar
[ERROR] urls[2] = file:/Users/xiangyue/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar
Can't get a response from http://discovery:8761/eureka/apps/
config_1 | java.net.ConnectException: Connection refused
config_1 | at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_66-internal]
config_1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_66-internal]
config_1 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_66-internal]
config_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_66-internal]
config_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_66-internal]
config_1 | at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_66-internal]
config_1 | at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117) ~[httpclient-4.5.jar!/:4.5]
config_1 | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.jar!/:4.5]
config_1 | at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170) ~[jersey-apache-client4-1.11.jar!/:1.11]
config_1 | ... 20 common frames omitted
And
open $(echo \"$(echo $DOCKER_HOST)/movie\"|
\sed 's/tcp:\/\//http:\/\//g'|
\sed 's/[0-9]\{4,\}/10000/g'|
\sed 's/\"//g')
opened this url http://127.0.0.1:8761/. But the webpage is not available.
[ERROR] Failed to execute goal on project users-microservice: Could not resolve dependencies for project org.kbastani:users-microservice:jar:0.1.0: Could not find artifact org.springframework.data:spring-data-neo4j:jar:3.4.0.BUILD-SNAPSHOT in spring-snapshots (http://repo.spring.io/libs-snapshot-local) -> [Help 1]
I followed the instructions from "Building Microservices with Spring Cloud and Docker" article and at docker-compose up stage I see that consul container cannot start due to java.net.UnknownHostException: consulagent.
I tried to do docker-compose up consulagent first to ensure that it starts before everything else. The issue might be caused by usage of Docker Tools on Mac but I'm not sure if it is the case.
Hello,I am a new starter.I run these projects only discovery-microservice can start well. Should I need change some configuration? I run discovery-microservice for *-microservice but I don't know how to run movies-ui and hystrix-dashboard . Why I have run the discovery-microservice project but still happening 'Cannot execute request on any known server' ?
I have one question regarding the bootstrap file, for example the one in movie-microservice.
In that file, we point to the config server with "uri: http://configserver:8888". However, the hostname configserver makes sense only services are started with docker-compose if I understood it well.
Therefore, when I start the service locally in my ide for example without docker, I can't resolve the domain name.
I think the profile feature can help us to resolve this problem but all profile related resources I found is about the configserver but not on the bootstrap file.
| com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
user_1 | at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111)
user_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
user_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
user_1 | at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
user_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
user_1 | at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:832)
user_1 | at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1396)
user_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
user_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
user_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
user_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
user_1 | at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.3.258:build (default) on project users-microservice: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused -> [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
When I open http://<my_dockermachine_ip>:10000/moviesui in Firefox/IE etc, I get a JS popup saying "Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=7.4.5".
thanks for you demo code ,it helped me a lot.still got some trouble here.
Below is some code snippet in SpringMvcContract.java
in this method:
protected boolean processAnnotationsOnParameter(MethodMetadata data, Annotation[] annotations, int paramIndex) {
there is the code:
AnnotatedParameterProcessor processor =
annotatedArgumentProcessors.get(parameterAnnotation.annotationType());
isHttpAnnotation |= processor.processArgument(context, parameterAnnotation);
the movie ui service has a userClient annotated with @FeignClient and there is a method "void createUser(@requestbody User user);"
annotatedArgumentProcessors will get a null processor because of annotatedArgumentProcessors get initialized by getDefaultAnnotatedArgumentsProcessors which only used three defautlt processors by PathVariableParameterProcessor,RequestParamParameterProcessor,RequestHeaderParameterProcessor.
and the result is it will throw nullpointer exception.
is this a bug or just something i forget to config.
I cloned the git repo and wanted to spin-up docker containers with microservices.
I get the following error upon mvn clean install
[ERROR] Failed to execute goal on project users-microservice: Could not resolve dependencies for
project org.kbastani:users-microservice:jar:0.1.0: Failed to collect dependencies at
org.springframework.data:spring-data-neo4j:jar:3.4.0.RC1 -> org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Failed
to read artifact descriptor for org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Could not transfer artifact
org.neo4j:neo4j-cypher-dsl:pom:2.0.1 from/to spring-snapshots (http://repo.spring.io/libs-snapshot-local):
Failed to transfer file: http://repo.spring.io/libs-snapshot-local/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-
cypher-dsl-2.0.1.pom. Return code is: 409 , ReasonPhrase:Conflict. -> [Help 1]
Hi Kbastani,
Thanks for sharing springcloud example but issue is i am not still able to lauch application.
Issues
Majority of spring framework dependancies has been removed from spring io repository.
I know it is much time consuming for you.
It would be nice if you share offline jars for the projects.
Issue while maven clean-install of config-microservice project.
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:522)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:77)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\org\apache\maven\plugins\maven-jar-plugin\2.5\maven-jar-plugin-2.5.pom.lastUpdated
[DEBUG] Using connector AsyncRepositoryConnector with priority 100 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.5/maven-jar-plugin-2.5.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.5/maven-jar-plugin-2.5.pom (8 KB at 2.5 KB/sec)
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\org\apache\maven\plugins\maven-jar-plugin\2.5\maven-jar-plugin-2.5.pom.lastUpdated
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\org\apache\maven\plugins\maven-jar-plugin\2.5_maven.repositories
[DEBUG] Using connector AsyncRepositoryConnector with priority 100 for http://repo.spring.io/libs-snapshot-local
Downloading: http://repo.spring.io/libs-snapshot-local/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom
[DEBUG] onThrowable
org.sonatype.aether.connector.async.TransferException: Failed to transfer http://repo.spring.io/libs-snapshot-local/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom. Error code 409, Conflict
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.handleResponseCode(AsyncRepositoryConnector.java:478)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.access$1800(AsyncRepositoryConnector.java:90)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask$1.onCompleted(AsyncRepositoryConnector.java:750)
at org.sonatype.aether.connector.async.CompletionHandler.onCompleted(CompletionHandler.java:180)
at org.sonatype.aether.connector.async.CompletionHandler.onCompleted(CompletionHandler.java:39)
at com.ning.http.client.providers.netty.NettyResponseFuture.getContent(NettyResponseFuture.java:244)
at com.ning.http.client.providers.netty.NettyResponseFuture.done(NettyResponseFuture.java:269)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.markAsDone(NettyAsyncHttpProvider.java:1560)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.finishUpdate(NettyAsyncHttpProvider.java:1577)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(NettyAsyncHttpProvider.java:1252)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:149)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:522)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:77)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\com\spotify\docker-maven-plugin\0.2.3\docker-maven-plugin-0.2.3.pom.lastUpdated
[DEBUG] Using connector AsyncRepositoryConnector with priority 100 for http://repo.spring.io/libs-milestone-local
Downloading: http://repo.spring.io/libs-milestone-local/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom
[DEBUG] onThrowable
org.sonatype.aether.connector.async.ResourceDoesNotExistException: Unable to locate resource http://repo.spring.io/libs-milestone-local/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom. Error code 404
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.handleResponseCode(AsyncRepositoryConnector.java:465)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.access$1800(AsyncRepositoryConnector.java:90)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask$1.onCompleted(AsyncRepositoryConnector.java:750)
at org.sonatype.aether.connector.async.CompletionHandler.onCompleted(CompletionHandler.java:180)
at org.sonatype.aether.connector.async.CompletionHandler.onCompleted(CompletionHandler.java:39)
at com.ning.http.client.providers.netty.NettyResponseFuture.getContent(NettyResponseFuture.java:244)
at com.ning.http.client.providers.netty.NettyResponseFuture.done(NettyResponseFuture.java:269)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.markAsDone(NettyAsyncHttpProvider.java:1560)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.finishUpdate(NettyAsyncHttpProvider.java:1582)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(NettyAsyncHttpProvider.java:1243)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:149)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndFireMessageReceived(ReplayingDecoder.java:522)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:77)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\com\spotify\docker-maven-plugin\0.2.3\docker-maven-plugin-0.2.3.pom.lastUpdated
[DEBUG] Using connector AsyncRepositoryConnector with priority 100 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom
Downloaded: http://repo.maven.apache.org/maven2/com/spotify/docker-maven-plugin/0.2.3/docker-maven-plugin-0.2.3.pom (11 KB at 1.5 KB/sec)
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\com\spotify\docker-maven-plugin\0.2.3\docker-maven-plugin-0.2.3.pom.lastUpdated
[DEBUG] Writing resolution tracking file C:\Users\sur.m2\repository\com\spotify\docker-maven-plugin\0.2.3_maven.repositories
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: org.kbastani:config-microservice:0.1.0
[DEBUG] Dependencies (collect): [compile+runtime]
[DEBUG] Dependencies (resolve): [compile, compile+runtime, runtime, test]
[DEBUG] Repositories (dependencies): [spring-snapshots (http://repo.spring.io/libs-snapshot-local, releases+snapshots), spring-snapshots-continuous (http://repo.spring.io/libs-snapshot-continuous-local, releases+snapshots), spring-milestones (http://repo.spring.io/libs-milestone-local, releases), spring-releases (http://repo.spring.io/libs-release-local, releases), central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] Repositories (plugins) : [spring-snapshots (http://repo.spring.io/libs-snapshot-local, releases+snapshots), spring-milestones (http://repo.spring.io/libs-milestone-local, releases), central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean)
[DEBUG] Style: Regular
[DEBUG] Configuration:
I cloned the projects and trying to execute it over a linux machine. All containers are created just fine, I can see them with "docker ps" and look at usage with "docker stats".
However, memory keeps going up and up.. eventualy my laptop (core i5, 10gb RAM) stops responding and die!
I tried with mem_limit on each service definition on docker_compose.yml, and I can see the limit working on docker stats... however memory keeps going up and when the container gets > 95% usage it does dead... container stops working and is removed. So.. this setup just prevents my pc to die.. but nothing else.
I also tried with a JHipster project and set JAVA_OPTS for -Xmx and other memory parameters.. but the result is the same.
docker_user_1
java -Djava.security.egd=f ...
Up
9000/tcp `
configserver http://localhost:8888/ - gives WhiteLabel error configserver_1 | com.sun.jersey.api.client.ClientHandlerException: java.net.NoRouteToHostException: No route to host (Host unreachable) configserver_1 | at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar!/:1.19.1] configserver_1 | at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) ~[jersey-client-1.19.1.jar!/:1.19.1] configserver_1 | at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.sun.jersey.api.client.Client.handle(Client.java:652) ~[jersey-client-1.19.1.jar!/:1.19.1] configserver_1 | at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) ~[jersey-client-1.19.1.jar!/:1.19.1] configserver_1 | at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) ~[jersey-client-1.19.1.jar!/:1.19.1] configserver_1 | at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570) ~[jersey-client-1.19.1.jar!/:1.19.1] configserver_1 | at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.register(AbstractJerseyEurekaHttpClient.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:815) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] configserver_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] configserver_1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] configserver_1 | Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable) configserver_1 | at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_111] configserver_1 | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_111] configserver_1 | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_111] configserver_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_111] configserver_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_111] configserver_1 | at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_111] configserver_1 | at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:120) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:179) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:612) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.2.jar!/:4.5.2] configserver_1 | at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) ~[jersey-apache-client4-1.19.1.jar!/:1.19.1] configserver_1 | ... 29 common frames omitted configserver_1 | configserver_1 | 2017-07-05 07:56:33.993 WARN 1 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failure configserver_1 | 2017-07-05 07:56:33.993 WARN 1 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_CONFIGSERVER/c2c8908c9a3a:configserver:8888 - registration failed Cannot execute request on any known server configserver_1 | configserver_1 | com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server configserver_1 | at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:815) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] configserver_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] configserver_1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] configserver_1 | configserver_1 | 2017-07-05 07:56:33.994 WARN 1 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator configserver_1 | configserver_1 | com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server configserver_1 | at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:815) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) ~[eureka-client-1.4.12.jar!/:1.4.12] configserver_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] configserver_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] configserver_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] configserver_1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
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 install command 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
When starting the polyglot persistence demo I noticed a port clash between the movie-microservice and the recommendation-microservice containers, both exposing port 9006
Is this intentional? Or should one f them be moved to 9005?
Thanks for publishing this project! I find the aspect of running integration tests across Docker containers particularly appealing for detecting issues early on developer machines and wanted to experiment a bit.
So, here's what I did:
ran docker-compose -f ./docker/docker-compose.yml up and wait for the application to come up
invoke mvn test to run the tests, however, I keep getting the following exception (here's a link to a gist that includes the unstripped log output):
While I assume that the docker-compose.yml configuration assigns the hostname discovery to the discovery-microservice correctly, this hostname would only be visible to other Docker containers that link to this container - but not to Maven.
As of now, this project does not include many tests. Any plans on adding any integration tests? Do you have an approach on your mind to solve the DNS issue pragmatically? Thanks!
Hi,
I would like to know how to use the demo. I was able to run everything I can see all my microservices in eureka the movies UI show only user registration what else I can do ?
Hi, I new in Microservice and Docker. When I run "docker-compose up" command,I would be long time to process and machine'd be slow. The screen shot here:
I can build it fine.
I can execute 'docker-compose up' fine, but when the instances boot I get an exception which I am unable to resolve:
gateway_1 | 2016-03-14 18:30:06.103 WARN 1 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
gateway_1 | 2016-03-14 18:30:06.248 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application startup failed
gateway_1 |
gateway_1 | org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at services.Application.main(Application.java:11) [app.jar!/:0.1.0]
gateway_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_72-internal]
gateway_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_72-internal]
gateway_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_72-internal]
gateway_1 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_72-internal]
gateway_1 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) [app.jar!/:0.1.0]
gateway_1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72-internal]
gateway_1 | Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
gateway_1 | at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:99) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:76) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:457) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:168) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:160) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | ... 14 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.client.discovery.DiscoveryClient org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration.discovery; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'discoveryClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.netflix.appinfo.EurekaInstanceConfig]: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:233) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:214) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:90) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:78) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:237) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:224) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:85) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:209) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5244) ~[tomcat-embed-core-8.0.30.jar!/:8.0.30]
gateway_1 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.0.30.jar!/:8.0.30]
gateway_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) ~[tomcat-embed-core-8.0.30.jar!/:8.0.30]
gateway_1 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) ~[tomcat-embed-core-8.0.30.jar!/:8.0.30]
gateway_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_72-internal]
gateway_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_72-internal]
gateway_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_72-internal]
gateway_1 | ... 1 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.client.discovery.DiscoveryClient org.springframework.cloud.netflix.zuul.ZuulProxyConfiguration.discovery; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'discoveryClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.netflix.appinfo.EurekaInstanceConfig]: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | ... 33 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'discoveryClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.netflix.appinfo.EurekaInstanceConfig]: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | ... 35 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | ... 48 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.cloud.netflix.sidecar.SidecarProperties org.springframework.cloud.netflix.sidecar.SidecarConfiguration$EurekaInstanceConfigBeanConfiguration.sidecarProperties; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | ... 69 common frames omitted
gateway_1 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarProperties': Could not bind properties to SidecarProperties (prefix=sidecar, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:339) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:289) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.5.RELEASE.jar!/:4.2.5.RELEASE]
gateway_1 | ... 71 common frames omitted
gateway_1 | Caused by: org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
gateway_1 | Field error in object 'sidecar' on field 'port': rejected value [0]; codes [Min.sidecar.port,Min.port,Min.int,Min]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [sidecar.port,port]; arguments []; default message [port],1]; default message [must be greater than or equal to 1]
gateway_1 | at org.springframework.boot.bind.PropertiesConfigurationFactory.validate(PropertiesConfigurationFactory.java:362) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.bind.PropertiesConfigurationFactory.doBindPropertiesToTarget(PropertiesConfigurationFactory.java:271) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.bind.PropertiesConfigurationFactory.bindPropertiesToTarget(PropertiesConfigurationFactory.java:241) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:334) ~[spring-boot-1.3.2.RELEASE.jar!/:1.3.2.RELEASE]
gateway_1 | ... 84 common frames omitted
gateway_1 |
I am trying to start user-service and discovery-service as standalone services in my local box served at different ports instead of running them in docker containers.
The reason behind running them as standalone services is we want to deploy them as standalone microservices in production.
1. I started the discovery-service
cd spring-cloud-microservice-example/discovery-microservice
mvn clean spring-boot:run
The eureka server started correctly from logs below
2015-08-18 14:46:12.139 INFO 2305 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2015-08-18 14:46:12.178 WARN 2305 --- [ Thread-2] c.n.eureka.cluster.PeerEurekaNodes : The replica size seems to be empty. Check the route 53 DNS Registry
2015-08-18 14:46:12.237 INFO 2305 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8761 (http)
2015-08-18 14:46:12.239 INFO 2305 --- [ main] services.Application : Started Application in 4.198 seconds (JVM running for 6.99)
2015-08-18 14:48:42.257 INFO 2305 --- [ Thread-2] c.n.e.PeerAwareInstanceRegistryImpl : Got 1 instances from neighboring DS node
2015-08-18 14:48:42.257 INFO 2305 --- [ Thread-2] c.n.e.PeerAwareInstanceRegistryImpl : Renew threshold is: 1
2015-08-18 14:48:42.258 INFO 2305 --- [ Thread-2] c.n.e.PeerAwareInstanceRegistryImpl : Changing status to UP
2015-08-18 14:48:42.259 INFO 2305 --- [ Thread-2] c.n.eureka.AbstractInstanceRegistry : Finished initializing remote region registries. All known remote regions: []
2015-08-18 14:48:42.267 INFO 2305 --- [ Thread-2] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2. I started the config-service
cd spring-cloud-microservice-example/config-microservice
2015-08-18 14:46:38.118 WARN 2322 --- [ost-startStop-1] com.netflix.discovery.DiscoveryClient : Can't get a response from http://discovery:8761/eureka/apps/
org.apache.http.conn.ConnectTimeoutException: Connect to discovery:8761 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.jar:4.5]
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170) ~[jersey-apache-client4-1.11.jar:1.11]
... 88 common frames omitted
Wrapped by: com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to discovery:8761 timed out
3. I started the user-service
cd spring-cloud-microservice-example/users-microservice
2015-08-18 14:56:49.839 WARN 2391 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : Can't get a response from http://discovery:8761/eureka/apps/CONFIGSERVER
org.apache.http.conn.ConnectTimeoutException: Connect to discovery:8761 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117) ~[httpclient-4.5.jar:4.5]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[httpclient-4.5.jar:4.5]
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170) ~[jersey-apache-client4-1.11.jar:1.11]
... 20 common frames omitted
Wrapped by: com.sun.jersey.api.client.ClientHandlerException: org.apache.http.conn.ConnectTimeoutException: Connect to discovery:8761 timed out