elasticsearch - jhipster:弹性搜索节点不可用
问题描述
我正在使用 jhipster(4.14.3 版)生成一个网络应用程序。问题是在生产模式下,应用程序无法连接到在端口 9200 上运行良好的弹性搜索服务。任何帮助将不胜感激。
应用程序-prod.yml:
data:
elasticsearch:
cluster-name: elasticsearch
cluster-nodes: localhost:9300
弹性搜索.yml:
cluster.name: elasticsearch
path.data: C:\Program Files\elasticsearch-6.2.4\data
path.logs: C:\Program Files\elasticsearch-6.2.4\logs
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
异常详情:
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are avail
able: [{#transport#-1}{localhost}{127.0.0.1:9300}]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(T
ransportClientNodesService.java:326)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNo
desService.java:223)
at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyCl
ient.java:55)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:295)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:86)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56)
解决方案
一般是版本问题。编辑jhipster 项目文件夹中的src/main/docker/ elasticsearch.yml 并安装相同版本的 ElasticSearch 服务器。
推荐阅读
- javascript - 如果我单击反应 js 中的关闭按钮,如何更改状态
- xamarin - 如何在 Xamarin 中获取绑定之外的数据
- java - 无法从 Spring Boot 应用程序和 SQL Developer 访问 Docker 上的 DB2 数据库
- php - 如果在 laravel 自定义验证中包含多个值,则不会验证输入数组
- python - Python:如果任何行项目为空,熊猫将丢弃所有行
- python-3.x - 在 python 中处理 USR1 信号
- css - 如何在关键帧动画后隐藏元素
- python-3.x - 我正在尝试使用 subprocces 向 spi.exe 发送一些命令
- python - Fitting empirical distribution to theoretical ones with Scipy (Python) with bounds of parameters
- tensorflow-lite - 尝试使用 TFlite 运行推理时出错