"type": "server", "timestamp": "2022-05-27T07:24:11,958Z", "level": "ERROR", "component"

created at 05-30-2022 views: 7

error message

{"type": "server", "timestamp": "2022-05-27T07:24:11,958Z", "level": "ERROR", "component": 
"o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "elasticsearch", "node.name": "234e4baad6ab", "message": "uncaught exception in thread [main]",

The above error comes from deploying elasticsearch:7.6.2 in the docker20.10.16 environment

command:

docker run --name es -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms128m -Xmx256m" \
-v /home/DataBrainProject/Elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /home/DataBrainProject/Elasticsearch/data:/usr/share/elasticsearch/data \
-v /home/DataBrainProject/Elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-d elasticsearch:7.6.2

I wasted 2 hours dealing with this problem ~ the reason is that simple.

solution

chmod 777 /home/DataBrainProject/Elasticsearch/config/
chmod 777 /home/DataBrainProject/Elasticsearch/data
chmod 777 /home/DataBrainProject/Elasticsearch/plugins

The reason is because there is no permission to mount~

created at:05-30-2022
edited at: 05-30-2022: