Can't start elastic elasticsearch-8.9.0

I installed elasticsearch-8.9.0 on root account in centos 7
But couldn't start. i use this command "systemctl start elasticsearch.service"
And i couldn't find any wrong Permission....help please...ㅠㅠ

Jul 26 20:06:43 SI3417-9 systemd-entrypoint[16880]: /usr/share/elasticsearch/bin/elasticsearch-env: line 49: /usr/bin/uname: Permission denied
Jul 26 20:06:43 SI3417-9 systemd-entrypoint[16880]: /usr/share/elasticsearch/bin/elasticsearch-env: line 78: /etc/sysconfig/elasticsearch: Permission denied

What do you mean?

BTW, here is the installation guide. Did you follow exactly all the steps?

I mean 'installed elasticsearch with root authority'

Than i fellow installation guide! And installed with yum

Which exact commands failed then?

please let us see you configuration file

i did just this command "systemctl start elasticsearch.service"

just default!
didnt edit any configuration files

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
#network.host: 192.168.0.1
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- 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: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

It was supposed to be:

sudo systemctl start elasticsearch.service

yes...i did but didn't work

[root@SI3417-9 ~]# sudo systemctl start elasticsearch.service
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

[root@SI3417-9 ~]# sudo systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2023-07-27 14:00:17 KST; 20s ago
     Docs: https://www.elastic.co
  Process: 21675 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
 Main PID: 21675 (code=exited, status=1/FAILURE)

Jul 27 14:00:17 SI3417-9 systemd[1]: Starting Elasticsearch...
Jul 27 14:00:17 SI3417-9 systemd-entrypoint[21675]: /usr/share/elasticsearch/bin/elasticsearch-env: line 78: /etc/sysconfig/elasticsearch: Permission denied
Jul 27 14:00:17 SI3417-9 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 27 14:00:17 SI3417-9 systemd[1]: Failed to start Elasticsearch.
Jul 27 14:00:17 SI3417-9 systemd[1]: Unit elasticsearch.service entered failed state.
Jul 27 14:00:17 SI3417-9 systemd[1]: elasticsearch.service failed.type or paste code here

So I just started a centos7 VM on GCP and followed all the steps mentioned in the guide. Just note that the guide says:

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

Where I ran instead:

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

So here is my full history on that machine:

[david@dadoonet-test-89-centos ~]$ history
    1  sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
    2  sudo vi /etc/yum.repos.d/elasticsearch.repo
    3  sudo yum install --enablerepo=elasticsearch elasticsearch
    4  sudo systemctl start elasticsearch.service
    5  curl -k https://localhost:9200/ --user elastic

And this gave me:

{
  "name" : "dadoonet-test-89-centos",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "tQrfL0YNS-K35rbo5pY4iA",
  "version" : {
    "number" : "8.9.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "8aa461beb06aa0417a231c345a1b8c38fb498a0d",
    "build_date" : "2023-07-19T14:43:58.555259655Z",
    "build_snapshot" : false,
    "lucene_version" : "9.7.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

So I have no idea of what wrong thing you are doing on your side.
Could start from scratch again and do the same thing I did and share the outcome of every step?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.