generator-jhipster: jhipster 4.0 microservice : eureka password error

I’m creating a new microservices project.

I’m using JHipster 4.0.5 and, according this issue [https://github.com/jhipster/generator-jhipster/issues/4905] Eureka password is define by jhipster.registry.password

So, in application-dev.yml Eureka configuration is, by default :

eureka: instance: prefer-ip-address: true client: enabled: true healthcheck: enabled: true registerWithEureka: true fetchRegistry: true serviceUrl: defaultZone: http://admin:${jhipster.registry.password}@localhost:8761/eureka/

in the file bootstrap-dev.yml the password definition is look good:

jhipster: registry: password: admin

When I launch my gateway (or microservice) I’ve got this error message

2017-02-17 10:32:12.794 ERROR 2064 — [ restartedMain] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error

java.lang.IllegalArgumentException: Illegal character in authority at index 7: http://admin:${jhipster.registry.password}@localhost:8761/eureka/

at java.net.URI.create(URI.java:852)

at com.sun.jersey.api.client.Client.resource(Client.java:434)

at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.getApplicationsInternal(AbstractJerseyEurekaHttpClient.java:187)

Work fine when I change my Eureka configuration in application-dev.yml to : defaultZone: http://admin:admin@localhost:8761/eureka/

My configuration

  • JHipster version : 4.0.5
  • Project : microservices
  • Registry version : 2.5.8
  • OS : Windows 7 64bits
  • Launch from IDE Intellj

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (18 by maintainers)

Commits related to this issue

Most upvoted comments

I have submitted a PR to the docs: https://github.com/jhipster/jhipster.github.io/pull/398 @JulienVincendeau is it enough to close this issue for you ?

yes you’re correct @PierreBesson !

@jdubois When you revert to admin:admin in case the profile is not set, although it does not fail but it does not mean that it actually works ! I just tested and in this case although eureka discovery is working but then the configserver fails as it is using the default configserver url (“http://localhost:8888/gateway/default”). @pascalgrimaud Can you confirm that what I’m saying is correct ?

Oh, that’s because they don’t read the profile at the right time? That’s pretty bad! Then, I would really want to revert to the old “admin:admin” stuff in the application-*.yml file as:

  • It doesn’t have this very weird issue, that will annoy a lot of people
  • You don’t lose any thing, it’s just that the configuration isn’t as clean as it could be