在服务器配置docker ELK时发现 elasticsearch启动日志报错
nested: AccessDeniedException[/usr/share/elasticsearch/data/nodes/0]
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-v ~/data/docker/elasticsearch/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v ~/data/docker/elasticsearch/data:/usr/share/elasticsearch/data \
-v ~/data/docker/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-d elasticsearch:7.13.4
将数据源挂载到外面的data文件
权限写入错误
经过 chmod -R 777 data
正常启动