title: Spring Cloud - Registry Service port customization
body: <p>I'd like to customize the Eureka port with Spring Cloud.
  With the default port below, the services registry sees itself right (within the provided GUI)</p>
  
  <pre><code>spring:
    application:
      name: services-registry
  server:
    port: 8761
  
  eureka:
    instance:
      hostname: localhost
      nonSecurePort: ${server.port}
    client:
      register-with-eureka: true
      fetch-registry: false
      service-url:
        default-zone: http://${eureka.instance.hostname}:${server.port}/eureka/
  </code></pre>
  
  <p>But if I just change server.port to 8787, no service can register itself, not even the services registry itself.</p>
  
  <pre><code>2017-01-09 16:18:21.584  WARN 17496 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient    : Request execution failure
  2017-01-09 16:18:21.584  WARN 17496 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_SERVICES-REGISTRY/xxx.org:services-registry:8787 - registration failed Cannot execute request on any known server
  
  com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
  ...
  2017-01-09 16:13:33.299  WARN 17496 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator     : There was a problem with the instance info replicator
  
  com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
  </code></pre>
  
  <p>Can someone explain this issue and save my day? Thanks!</p>