Linux installation Elasticsearch, Elasticsearch can not be started with the root user, the root user will be error refer to the log in the error details, how to solve this situation? The following small series for everyone to bring Linux installation Elasticsearch start error resolution, go and see it together
This is a special solution to the unusual problems that arise today. After you install the Elasticsearch, you need to pay attention to when booting the problem is that Elasticsearch can not be started with the root user (this is based on elasticsearch security policy, not allowed to start with root), The following exception is reported as root user startup:
Refer to the log for complete error details.
-
Software Name:
-
Elasticsearch Head Plugin v5.4.1 official latest version
-
Software size:
-
31.8MB
-
Update Time:
-
2017-06-05
So we need to create a new user and user group, this user and user group is dedicated to managing the Elasticsearch service. The new user and user groups are as follows:
Groupadd-g elasticsearch3--> New user group named Elasticsearch3
Useradd-u 701-g Elasticsearch3 ——-> New user, User named Elasticsearch3
passwd ELASTICSEARCH3 ——-> Set user password to Elasticsearch3
Gpasswd-a Elasticsearch3 elasticsearch3-–> Adds the user to the user group, the first ELASTICSEARCH3 represents the user name, and the second ELASTICSEARCH3 represents the group name. Such as:
Both the user name and the user group have been created, and the user is added to the user group as well. Below we will use this specialized management Elasticsearch user to start the service, the result is reported the following error:
This is because there is no permission to cause, now we give permission:
Then start the Elasticsearch and start the success.
Linux installation Elasticsearch Start Error resolution method