Question: Java lang.RuntimeException: can not run elasticsearch as root
Solution:
Elaticsearch cannot be started by root by default, so it will report Java.Lang.runtimeException: can not run elasticsearch as root.
There are two types of solutions:
1. Modify the elaticsearch configuration to allow the root user to start (not recommended)
#Add the parameter -Des.insecure.allow.root=true when executing elasticSearch, the complete command is as follows
./elasticsearch -Des.insecure.allow.root=true
#Or open the elasticsearch executable file with vi, and add the following command before the variable ES_JAVA_OPTS is used
ES_JAVA_OPTS="-Des.insecure.allow.root=true"
2. Create users for elaticsearch and grant corresponding permissions
adduser es
passwd es
chown -R es:es elasticsearch-6.3.2/
chmod 770 elasticsearch-6.3.2/
Read More:
- How to Solve elasticsearch-7.15.1 operation errors
- How to Solve elasticSearch8.1.2 Install Error in Win10
- How to Solve elasticsearch and logstash Install Error
- How to Solve creating bean with name ‘mappingjackson2httpmessageconverter’ error when elasticsearch advanced client starts‘
- How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
- ElasticSearch Create Index Error: mapper_parsing_exception Root mapping definition has unsupported parameters
- [Solved] Elasticsearch.service failed after enable elasticsearch security features
- How to Solve Error: avoided redundant navigation to current location: “index/user”
- [Solved] Flink jdbc Error: Access Denied for user ‘root‘@‘10.0.0.x‘ (using password: YES)
- How to Solve Ogg start error message ogg-00014
- How to Solve Error while executing: am start -n
- [Solved] ERROR: Attempting to operate on hdfs namenode as root ERROR: but there is no HDFS_NAMENODE_USER defi
- How to Solve Hyperf Failed to Start Error After Aliyun ACM Installed
- How to Solve Rabbitmq Error: Failed to start RabbitMQ broker
- How to Solve Docker Run Error: standard_init_linux.go:219: exec user process caused: exec format error
- How to Solve Application failed to start error
- [Solved] kubeflow pipeline visualization component Error: WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager…
- [Solved] Elasticsearch error: cannot downgrade a node from version [7.xx.x] to version [7.xx.x]
- How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon
- How to Solve hadoop3.x.x sh start-dfs.sh Startup Error