ERROR DiscoveryClient - ........ was unable to send heartbeat!

See original GitHub issue

Hi,

I’m using Eureka with Brixton.RC2 on my local box. I am facing below issue with Discovery client. I tried almost all the posts who this issue is reported, but I am not able to resolve this issue. Could you help on this:

7620: WARN  RetryableEurekaHttpClient - Request execution failure
7620: ERROR DiscoveryClient - DiscoveryClient_USER-SERVICE/153.39.212.155:user-service:1111 - was unable to send heartbeat!
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
        at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$3.execute(EurekaHttpClientDecorator.java:92)
        at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
        at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.sendHeartBeat(EurekaHttpClientDecorator.java:89)
        at com.netflix.discovery.DiscoveryClient.renew(DiscoveryClient.java:827)
        at com.netflix.discovery.DiscoveryClient$HeartbeatThread.run(DiscoveryClient.java:1383)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)`

My code for Eureka Server yml file is below:

server:
  port: 8761

eureka:
  client:
    registerWithEureka: false
    fetchRegistry: false
  server:
      waitTimeInMsWhenSyncEmpty: 0
  instance:
    hostname: localhost`

The discovery client application.yml file is as below:

server:
  context-path: /users
  port: 1111   # HTTP (Tomcat) port

spring:
  application:
     name: user-service

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
    region: default
    registryFetchIntervalSeconds: 5
    availabilityZones: 
      default: ${APPLICATION_DOMAIN:${DOMAIN:defaultZone}} 
  instance:
    leaseRenewalIntervalInSeconds: 10

endpoints:
  restart:
    enabled: true

Please help me to find, any missing part.

Thanks,

Anzar

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
anz2050commented, Jun 1, 2016

There was mis-match version of ‘spring-cloud-dependencies’ in server and client. I updated it to ‘Brixton.RELEASE’.

Now, it is working fine.

Thanks

0reactions
fifteenzhangcommented, Jul 22, 2020

Same issue And I fix it with eureka.client.serviceUrl.defaultZone Configuration

Refrences

Read more comments on GitHub >

github_iconTop Results From Across the Web

eureka-server:8002 - was unable to send heartbeat
I faced the similar issue. And in my case, my eureka.client.service-url.defaultZone was configured wrong. Below are my before and after fix ...
Read more >
Service Discovery: Eureka Clients - Spring Cloud Netflix
Eureka receives heartbeat messages from each instance belonging to a service. If the heartbeat fails over a configurable timetable, the instance is normally ......
Read more >
Not able to bootstrap with Eureka. - Google Groups
I keep getting an error Connection to http://localhost refused. ... DiscoveryClient:851 [DiscoveryClient_Heartbeat] [makeRemoteCall] Can't get a response ...
Read more >
Spring Cloud 客户端报错:- was unable to send heartbeat!
2021-05-18 21:25:44.644 ERROR 5452 — [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SERVICE-HI/LAPTOP-3BVBK0KA: ...
Read more >
com.netflix.discovery.DiscoveryClient.register java code ...
getStatusCode(); } catch (Throwable e) { logger.error(PREFIX + "{} - was unable to send heartbeat!", appPathIdentifier, e); return false; } }.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found