massivefermion
massivefermion

Reputation: 675

elasticsearch.service: Failed to reset devices.list: Operation not permitted

i installed elasticsearch on a vps as explained here. But now its not running and when i run systemctl status elasticsearch, the active status is a red failed.

These are the error messages:

elasticsearch.service: Failed to reset devices.list: Operation not permitted.

Started Elasticsearch.

Failed to attach 20579 to compat systemd cgroup /system.slice/elasticsearch.service: No such file or directory.

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

elasticsearch.service: Main process exited, code=exited, status=78/n/a.

elasticsearch.service: Failed with result 'exit-code'.

Before this, the status was green but all requests to port 9200 would error out with connection refused. Until I realized the vps had only 1 GB of ram but Xms and Xmx in the jvm.options file where set to 1 GB. So I brought those down to 512m(i edited -Xms1g and -Xmx1g to -Xms512m and -Xmx512m, that's the correct syntax, right?).

And these are the only uncommented lines in elasticsearch.yml:

path.data: /var/lib/elasticsearch

path.logs: /var/log/elasticsearch

network.host: 0.0.0.0

cluster.name: "raha"

I only added network.host and cluster.name.

We used to have someone in our company that had a habit of playing with user permissions in our servers. I think that may be an issue. But I have no way of finding that out. Does it help if I ask the hosting company to restore the vps to the default configurations? Is there any other suggestion?

Thanks

Upvotes: 0

Views: 1953

Answers (1)

Nicomedes E.
Nicomedes E.

Reputation: 1334

In /etc/elasticsearch/elasticsearch.yml, modify the settings under discovery as follows:

# ——————————— Discovery ———————————
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is [“127.0.0.1”, “[::1]”]
discovery.seed_hosts: [“host_name_you_choose”]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
cluster.initial_master_nodes: [“name_of_your_node”]

It's necessary to bootstrap the ElasticSearch implementation for the first usage as referenced here: https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-discovery-bootstrap-cluster.html

Upvotes: 0

Related Questions