Реестр JHIPSTER и NODEJS eureka-js-client NullPointerException

Я хотел бы добавить сервер node.js в качестве микросервисного приложения в jhipster-registry. Я использую пакет eureka-js-client npm

Вы можете найти тестовый узел проекта "Жудан / узел-эврика" на GitHub

// ------------------ Eureka Config --------------------------------------------
var Eureka = require("eureka-js-client").Eureka;

var client = new Eureka({
    filename: 'eureka-client',
    cwd: __dirname
});
client.logger.level('debug');
client.start(function(error){
    console.log(error || 'complete');
});


// ------------------ Server Config --------------------------------------------
var server = app.listen(9999, function () {
    var host = server.address().address;
    var port = server.address().port;
    console.log('Listening at http://%s:%s', host, port);
});

Я меняю eureka-client.yml для работы с jhipster-registery.

eureka:
  heartbeatInterval: 10
  maxRetries: 10
  requestRetryDelay: 60
  registryFetchInterval: 10
  host: 'admin:admin@localhost'
  port: 8761
  servicePath: '/eureka/apps'

instance:
  instanceId: "node-euraka"
  app: 'node-eureka'
  hostName: '127.0.0.1'
  #ipAddr: '192.168.10.145'
  statusPageUrl: 'http://127.0.0.1:9999'
  port:
      '$': 9999
      '@enabled': 'true'
  vipAddress: 'node-eureka'
  dataCenterInfo:
      '@class': 'com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo'
      name: 'MyOwn'

Это работает хорошо, у меня есть полный регистр и пульс работает хорошо

$ node app
Listening at http://:::9999
registered with eureka:  node-eureka/node-euraka
retrieved registry successfully
complete
eureka heartbeat success
retrieved registry successfully
eureka heartbeat success
retrieved registry successfully
eureka heartbeat success
retrieved registry successfully

Но после этого в jhipster-Registry я получаю нулевое исключение.

2017-07-18 10:46:46.452 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-07-18 10:46:46.454 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-07-18 10:46:46.597  INFO 13124 --- [  XNIO-2 task-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-07-18 10:46:46.597  INFO 13124 --- [  XNIO-2 task-1] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-07-18 10:46:46.597  INFO 13124 --- [  XNIO-2 task-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-07-18 10:46:46.597  INFO 13124 --- [  XNIO-2 task-1] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-07-18 10:46:51.458 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-07-18 10:46:51.460 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService       : Checking instance node-euraka - null
2017-07-18 10:46:51.467 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService       : Adding instance 'node-euraka' with URL: null
2017-07-18 10:46:51.489  INFO 13124 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService       : Zuul routes have changed - refreshing the configuration
2017-07-18 10:46:51.491 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exit: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with result = null
2017-07-18 10:46:56.492 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Enter: io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with argument[s] = []
2017-07-18 10:46:56.494 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService       : Checking instance node-euraka - null
2017-07-18 10:46:56.494 DEBUG 13124 --- [pool-4-thread-1] i.g.j.r.service.ZuulUpdaterService       : Instance 'node-euraka' already registered
2017-07-18 10:46:56.496 ERROR 13124 --- [pool-4-thread-1] i.g.j.r.aop.logging.LoggingAspect        : Exception in io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes() with cause = 'NULL' and exception = 'null'

java.lang.NullPointerException: null
        at io.github.jhipster.registry.service.ZuulUpdaterService.updateZuulRoutes(ZuulUpdaterService.java:65)

При каждом обновлении представления приложений в JHipster-регистре я получаю нулевое исключение

PS: JHipster-registery начинается с команды./mvnw без изменений в вашем git-репо

Я предоставляю вам полный журнал jhipster-registery regitry-logs.txt С уважением,

0 ответов

Другие вопросы по тегам