реестр, uaa и шлюз успешно работают на одном компьютере, микросервис на другом компьютере, когда я использую «sudo docker-compose -f app.yml up» для запуска микросервиса, он имеет исключение ниже:
2018-11-10 04:05:00.954 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1541822700953 with initial instances count: 2
2018-11-10 04:05:16.048 INFO 1 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_HDSHORTVIDEO/HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456 - Re-registering apps/HDSHORTVIDEO
2018-11-10 04:05:16.048 INFO 1 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_HDSHORTVIDEO/HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456: registering service...
2018-11-10 04:05:16.171 INFO 1 --- [tbeatExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_HDSHORTVIDEO/HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456 - registration status: 204
2018-11-10 04:06:00.925 WARN 1 --- [scoveryClient-1] 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:64)
at 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)
docker_hdshortvideo-app_1 exited with code 1
Журнал из реестра выглядит следующим образом:
2018-11-10 04:05:16.045 WARN 1 --- [ XNIO-2 task-4] c.n.e.registry.AbstractInstanceRegistry : DS: Registry: lease doesn't exist, registering resource: HDSHORTVIDEO - HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456
2018-11-10 04:05:16.045 WARN 1 --- [ XNIO-2 task-4] c.n.eureka.resources.InstanceResource : Not Found (Renew): HDSHORTVIDEO - HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456
2018-11-10 04:05:16.839 INFO 1 --- [pool-5-thread-1] i.g.j.r.service.ZuulUpdaterService : Zuul routes have changed - refreshing the configuration
2018-11-10 04:10:34.786 WARN 1 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry : DS: Registry: expired lease for HDSHORTVIDEO/HDShortVideo:2e3a0d7dfdcf1244b2a0c66fcafef456
2018-11-10 04:10:36.853 INFO 1 --- [pool-5-thread-1] i.g.j.r.service.ZuulUpdaterService : Zuul routes have changed - refreshing the configuration
часть application.yml, как показано ниже:
eureka:
client:
enabled: true
healthcheck:
enabled: true
fetch-registry: true
register-with-eureka: true
instance-info-replication-interval-seconds: 10
registry-fetch-interval-seconds: 10
instance:
appname: HDShortVideo
instanceId: HDShortVideo:${spring.application.instance-id:${random.value}}
lease-renewal-interval-in-seconds: 5
lease-expiration-duration-in-seconds: 10
и замените SEMAPHORE на нить:
hystrix:
command:
default:
execution:
timeout:
enabled: false
isolation:
thread:
timeoutInMilliseconds: 10000
В реестре: интерфейс 8761, состояние микросервиса НАЧИНАЕТСЯ с фоновым КРАСНЫМ.
Есть идеи?