Java.lang.IllegalStateException: Failed to close the XContentBuilder
TransportClient方式 XContentBuilder创建时没有调用.endObject();
NoNodeAvailableException[None of the configured nodes are available
1.Java客户端maven依赖的版本 与 es实例的版本不一致 或者 依赖的包有冲突(需保证所有es客户端依赖版本一致)
2.cluster name 配置有问题,请检查客户端传入cluster name和es实例 yml文件中的配置
3.如TransportClient方式连接ES,请检查防火墙,确保服务端端口打开并允许java进程访问
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
es实例启动时报错StartupException
es实例默认不能以root账户运行,请切换用户运行,并通过./elasticSearch -d 使进程在后台运行
Caused by: java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]
ES与Netty客户端版本冲突,解决方案:在创建客户端时增加配置,如下
System.setProperty("es.set.netty.runtime.available.processors", "false");