docker中启动elasticsearch报错:Error opening log file 'logs/gc.log': Permission denied

原创 2020-03-24 15:16 阅读(630)次
最近公司组织学习elasticsearch,于是自己又重温了一下es,由于没有环境,又重新在docker安装了一下elasticsearch,启动命令如下:docker run --name es -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node" -v /home/docker/es/plugins:/usr/share/elasticsearch/plugins -v /home/docker/es/data:/...

java xpack密码连接elasticsearch 7.1集群

原创 2019-09-08 14:18 阅读(906)次
java连接elasticsearch7.x版本跟6.x有很大不一样,api都改了不少。废话不多说,直接分享代码,让看到的人少掉坑里。由于我开启了xpack密码验证,所以连接es时也要加上密码,代码如下:import java.util.Date; import java.util.HashMap; import java.util.Map; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCred...

elasticsearch7.1保存时报错: Validation Failed: 1: type is missing;

原创 2019-09-08 14:11 阅读(1203)次
elasticsearch7.1保存时报错:org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: type is missing; at org.elasticsearch.action.ValidateActions.addValidationError(ValidateActions.java:26) at org.elasticsearch.action.index.IndexRequest.validate(IndexRequest.java:148) at org....
网站安全检测平台