1

integration Jhipster with Spring Sidecar to support other language Service,when i start sidecar service,it can't registry successfully . i have start the integration service(Python Serivce, and it has service http://localhost:8000/health ,and return {"status": "UP"} normallly.) Sidecar server's application-dev.yml

sidecar: health-uri: http://localhost:8000/management/health port: 8000

Jhipster registry shows starting(not up) ,and the sidecar service reports error like this below:

2020-05-08 14:36:26.523 WARN 10196 --- [scoveryClient-0] c.netflix.discovery.TimedSupervisorTask : task supervisor timed out
java.util.concurrent.TimeoutException: null
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:66)
at `enter code here`java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

2020-05-08 14:36:36.567 INFO 10196 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SIDECAR/sidecar:af01bef88a151cb5b3e9552c31ef6827 - Re-registering apps/SIDECAR
2020-05-08 14:36:36.567 INFO 10196 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SIDECAR/sidecar:af01bef88a151cb5b3e9552c31ef6827: registering service...
2020-05-08 14:36:36.693 INFO 10196 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_SIDECAR/sidecar:af01bef88a151cb5b3e9552c31ef6827 - registration status: 204
2020-05-08 14:36:40.516 DEBUG 10196 --- [ sidecar-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 31607 ms
2020-05-08 14:36:40.517 WARN 10196 --- [ sidecar-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Warning, Liquibase took more than 5 seconds to start up!
2020-05-08 14:36:56.532 WARN 10196 --- [scoveryClient-0] c.netflix.discovery.TimedSupervisorTask : task supervisor timed out

java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@7b219296 rejected from java.util.concurrent.ThreadPoolExecutor@68b1132e[Running, pool size = 2, active threads = 2, queued tasks = 0, completed tasks = 1] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:64) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWoenter code hererker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)`enter code here`
[![enter code here][1]][1]
Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49
william
  • 11
  • 3
  • Put a breakpoint under debugger in TimedSupervisorTask and see which task it's running. Could you edit your question with details about how you added sidecar and how you configured it in application*.yml? https://cloud.spring.io/spring-cloud-netflix/multi/multi__polyglot_support_with_sidecar.html Also what do you mean by "it can't registry successfully"? – Gaël Marziou May 08 '20 at 11:39
  • "it can't registry successfully" mean check health failed, here is application-dev.yml about sidecar config # application: 'sidecar: health-uri: http://localhost:8000/management/health' – william May 08 '20 at 12:53
  • Your sidecar application and your jhipster-registry are 2 different applications, right? Have you configured your sidecar so that it knows how to connect to your Eureka server (jhipster-registry) with `eureka.client.serviceUrl.defaultZone` property? – Gaël Marziou May 08 '20 at 14:14
  • Yes ,two deferent application. Jhipster-registry is application , SideCar is a application,Sidecar has config the eureka defaultZone: `http://admin:${jhipster.registry.password}@localhost:8761/eureka/` – william May 08 '20 at 14:32
  • Jhipster-registry can receive the sidecar's info `2020-05-08 20:49:31.577 DEBUG 15745 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService : Instance 'sidecar:7ff6c808ca02091667e3b51a4a32cc1d' already registered` but shows starting,not up – william May 08 '20 at 14:39
  • Could you paste the bootstrap.yml file of your sidecar app? Have you tried my suggestion to run sidecar under debugger to inspect which configuration it really uses for health checking when it fails? It's also important to know whether sidecar gets its configuration from registry. – Gaël Marziou May 08 '20 at 14:44
  • bootstrap.yml only contains central-config infos ,i comfirms it use the applicaiton-dev.yml, change applicaiton-dev.yml's db connection, it's worked . "run sidecar under debugger to inspect which configuration it really uses for health checking when it fails" , i haven't get what to do with this. – william May 08 '20 at 15:22
  • Please edit your question to paste the **bootstrap.yml file of your sidecar app**. There are too many things that can be wrong, central-config is for the registry not for sidecar unless I misunderstood you. In debugger, you'd inspect the instance variables of the failing task and see what it really uses. Is it more clear? – Gaël Marziou May 08 '20 at 15:26
  • i'get several url `healthCheckUrl=http://192.168.18.166:9080/actuator/health` `healthCheckRelativeUrl=management/health` `healthCheckExplicitUrl=http://192.168.18.166:9080/actuator/health` – william May 08 '20 at 15:36
  • OK so you see that the url and port is not the one you said.Sorry but it's too hard to try to help you if you don't provide the infos I asked several times. I hope you'll find someone else who has more time to offer than me. – Gaël Marziou May 08 '20 at 15:38
  • Sorry, it's my fault , I've not find it the first time – william May 08 '20 at 15:43
  • Thank you very much – william May 08 '20 at 15:43

0 Answers0