我已经生成了一个微服务配置为与jhipster 4.6.2的领事。 我正在运行与Docker的Consul(使用Virtualbox)。微服务总是连接到本地主管
因此,它不在本地主机上运行(但例如使用192.168.99.100)。
因此我修改了我的微服务的应用程序dev.yml设置这样的主机:
云: 领事: 发现: 喜欢-IP地址:真 主持人:192.168.99.100 端口:8500
...但是当我启动微服务时,它仍然尝试连接到本地主机(即下面的属性没有考虑到)。 后来我得到这个异常:
com.ecwid.consul.transport.TransportException: org.apache.http.conn.HttpHostConnectException: 连接到localhost:8500 [本地主机/ 127.0.0.1,本地主机/ 0:0 :0:0:0:0:0:1,localhost/fe80:0:0:0:0:0:0:1%1]失败: 拒绝连接
任何想法?
谢谢!
我的配置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 for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
##### **Environment and 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
作为一个侧面说明,JHipster不支持节点7.x,我们只支持LTS版本的记录。 –