我有点怀疑你在刷屏

在java 使用ES,访问后报错:None of the configured

Elasticsearch | 作者 kaven | 发布于2017年12月02日 | 阅读数:2111

刚入门 ES , 在java 使用ES,访问后报错:None of the configured nodes are available 。
这是我的ES配置:
cluster.name: kaven
node.name: master
network.host: 127.0.0.1
http.port: 9200
transport.tcp.port: 9300

这是我的java代码 :

InetSocketTransportAddress node = new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300);

Settings settings = Settings.builder()
.put("cluster.name", "kaven").put("node.name", "master").build();
TransportClient client = new PreBuiltTransportClient(settings);
client.addTransportAddress(node);

已邀请:

要回复问题请先登录注册