【发布时间】:2017-06-27 14:52:01
【问题描述】:
我有带有嵌入式弹性搜索的 Spring Boot 应用程序。我可以以 localhost:9200 的身份访问它,但它没有以真实 IP xx.xxx.x.xx:9200 响应。
端口是开放的,问题是它只监听本地接口。
netstat -vanp tcp | grep 9200
tcp4 0 0 127.0.0.1.9200 *.* LISTEN 131072 131072 31425 0
tcp6 0 0 ::1.9200 *.* LISTEN 131072 131072 31425 0
tcp6 0 0 fe80::1%lo0.9200 *.* LISTEN 131072 131072 31425 0
如何强制它听所有的,就像我为 web 8080 所做的那样
netstat -vanp tcp | grep 8080
tcp46 0 0 *.8080 *.* LISTEN 131072 131072 23002 0
我正在使用:
- spring-boot-starter-parent 1.4.1.RELEASE
- spring-boot-starter-data-elasticsearch 1.4.1.RELEASE
- elasticsearch 2.4.0 版
这是我的 application-dev.yml 的一部分
data:
elasticsearch:
cluster-name:
cluster-nodes:
properties:
path:
logs: target/elasticsearch/log
data: target/elasticsearch/data
http:
enabled: true
谢谢
【问题讨论】:
标签: elasticsearch spring-boot spring-data-elasticsearch