jhipster - micro-service always connects to localhost for consul -


i have generated microservice configured consul jhipster 4.6.2. i'm running consul docker (with virtualbox).

as result, not running on localhost (but e.g. 192.168.99.100).

hence modified application-dev.yml of microservice set host :

cloud: consul: discovery: prefer-ip-address: true host: 192.168.99.100 port: 8500

... when start micro-service, still trying connect localhost (i.e. property below not taken account). got exception :

com.ecwid.consul.transport.transportexception: org.apache.http.conn.httphostconnectexception: connect localhost:8500 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: connection refused

any idea ?

thanks !

my config jhipster:

{   "generator-jhipster": {     "promptvalues": {       "packagename": "org.fge.msconsul"     },     "jhipsterversion": "4.6.2",     "basename": "msconsul",     "packagename": "org.fge.msconsul",     "packagefolder": "org/fge/msconsul",     "serverport": "8082",     "authenticationtype": "jwt",     "hibernatecache": "hazelcast",     "clusteredhttpsession": false,     "websocket": false,     "databasetype": "sql",     "devdatabasetype": "h2disk",     "proddatabasetype": "postgresql",     "searchengine": false,     "messagebroker": false,     "servicediscoverytype": "consul",     "buildtool": "maven",     "enablesocialsignin": false,     "jwtsecretkey": "replaced-by-jhipster-info",     "enabletranslation": false,     "applicationtype": "microservice",     "testframeworks": [],     "jhiprefix": "jhi",     "skipclient": true,     "skipusermanagement": true,     "clientpackagemanager": "yarn"   } } </details>  ##### **jdl entity configuration(s) `entityname.json` files generated in `.jhipster` directory**  ##### **environment , tools**  java version "1.8.0_66" java(tm) se runtime environment (build 1.8.0_66-b17) java hotspot(tm) 64-bit server vm (build 25.66-b17, mixed mode)  git version 2.11.0 (apple git-81)  node: v7.4.0  npm: 5.0.3  bower: 1.8.0  gulp: [22:45:50] cli version 3.9.1  yeoman: 2.0.0  yarn: 0.27.5  docker version 17.05.0-ce, build 89658be  docker-compose version 1.13.0, build 1719ceb  execution complete 

spring cloud has bootstrap phase can load configuration properties external sources.

src/main/resources/bootstrap*.yml file must configure how connect consul.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -