8

When I run Eureka on port 8761, everything works great. The config server can register to Eureka without problem. When I change eureka port to 7001, however, things stop working and I can't seem to figure out how to fix them.

The issue seems to revolve around Eureka not being able to find a peer node running at: http://localhost:8761/eureka. The exception is:

2015-07-05 08:00:47.301 ERROR 4140 --- [egister-process] 
c.netflix.eureka.cluster.PeerEurekaNode  : PeerEurekaNode: 
http://localhost:8761/eureka/apps/: CONFIGSERVER/localhost:Register

Indeed when Eureka starts, it says: Adding replica node: http://localhost:8761/eureka/. It seems thus that somewhere the a replica node is assumed to be running at 8761.

Is there a way to disable Eureka looking for replica nodes? Or how do I control if and when and where replica should happen? I looked at the EurekaServerConfig class (http://netflix.github.io/eureka/javadoc/eureka-core/index.html) but I could not find anything that goes in this direction.

This is with Spring Cloud 1.0.2.RELEASE.

Klaus
  • 2,328
  • 5
  • 41
  • 62
  • please share your properties file. Did you change "defaultZone"? – hi_my_name_is Jul 06 '15 at 06:18
  • Thanks. That did the trick. I added eureka.serviceUrl.defaultZone to eureka application.yml file. Please add your comment as answer and I will accept it if you so wish. – Klaus Jul 06 '15 at 08:22

1 Answers1

14

You have to configure eureka.client.serviceUrl.defaultZone property in application.yml file.

Richard Neish
  • 8,414
  • 4
  • 39
  • 69
hi_my_name_is
  • 4,894
  • 3
  • 34
  • 50