springboot 整合es 报错

 es是在docker上安装的   启动springboot项目报错

org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{1MxrluOUQEmd_-7FKFE9iQ}{101.200.120.237}{101.200.120.237:9300}]

 

ES搭建完成后,使用localhost 和127.0.0.1都能正常访问和检索数据,但是使用服务器本机IP确报错。如下错误:
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{192.168.1.99}{192.168.1.99:9200}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:290)

解决方法:
修改es配置文件(elasticsearch-2.3.3\config\elasticsearch.yml),
修改network.host
network.host:服务器IP地址


  • network.host: 10.11.3.173
  • transport.tcp.port: 9300
  • transport.tcp.compress: true
  • http.port: 9100
posted @ 2020-01-19 16:48  旅行的青蛙  阅读(353)  评论(0编辑  收藏  举报