I can's run Elastic Search on CentOS7.8

After the installation and configuration is completed, I changed to user elastic and used /etc/elasticsearch-8.4.3/bin/elasticsearch for booting Elastic Search for many times, but every time it won's run successfully and will stuck with the following logs (just a part of them)

[2022-11-01T22:48:44,788][INFO ][o.e.n.Node               ] [node-1] started {node-1}{G9dqjNsoRKKiW16C2kJYRQ}{09N_x9F9Tjuqd3OeeYchEg}{node-1}{}{}{cdfhilmrstw}{ml.machine_memory=8092782592, ml.max_jvm_size=4047503360, ml.allocated_processors=8, xpack.installed=true}
[2022-11-01T22:48:44,966][INFO ][o.e.l.LicenseService     ] [node-1] license [88fd4761-fd27-4fa4-9645-01b993f9bc68] mode [basic] - valid
[2022-11-01T22:48:44,970][INFO ][o.e.g.GatewayService     ] [node-1] recovered [5] indices into cluster_state
[2022-11-01T22:48:47,847][INFO ][o.e.c.r.a.AllocationService] [node-1] current.health="YELLOW" message="Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.ds-metricbeat-8.4.3-2022.10.31-000001][0]]])." previous.health="RED" reason="shards started [[.ds-metricbeat-8.4.3-2022.10.31-000001][0]]"
[2022-11-02T01:30:00,001][INFO ][o.e.x.m.MlDailyMaintenanceService] [node-1] triggering scheduled [ML] maintenance tasks
[2022-11-02T01:30:00,014][INFO ][o.e.x.m.a.TransportDeleteExpiredDataAction] [node-1] Deleting expired data
[2022-11-02T01:30:00,053][INFO ][o.e.x.m.j.r.UnusedStatsRemover] [node-1] Successfully deleted [0] unused stats documents
[2022-11-02T01:30:00,054][INFO ][o.e.x.m.a.TransportDeleteExpiredDataAction] [node-1] Completed deletion of expired ML data
[2022-11-02T01:30:00,055][INFO ][o.e.x.m.MlDailyMaintenanceService] [node-1] Successfully completed [ML] maintenance task: triggerDeleteExpiredDataTask

It can be seen that the first four logs are quite a long time away from the subsequent logs, and when trying to start the service before, there were even stuck at about 6 pm to about 9 pm on the first day, and then at about 1 am on the next day, there were several log outputs and then continued to be stuck until about 10 am and still did not start successfully.
Can't find any suggestions about this situation.

Why do you think Elasticsearch is stuck? It looks like Elasticsearch is up and running fine.

Really? Because it continuous output log message and i can do nothing but usectrl+c to cancel it for operate the system. Also during the time I think it's stuck I can't access the Elasticsearch, it'll return ERR_CONNECTION_TIMED_OUT.

You see logs stopped right here and I can't enter any valid command to do anything even to check the service running status. So I think it's stuck.

Please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them :slight_smile:

If you are starting the process in the foreground then you will not be released to the console. The logs you showed above are typical for when Elasticsearch has started and is available for access.

What command are you running?

How did you install Elasticsearch?

Exactly how are you starting it?

I used /etc/elasticsearch-8.4.3/bin/elasticsearch to start Elasticsearch.

Actually I tried three ways for installing Elasticsearch, docker, rpm and yum. All according by Elastic's document and met the same problem.
And I used /etc/elasticsearch-8.4.3/bin/elasticsearch to start Elasticsearch.

If you are using a package or a repo then use systemctl, it's designed to manage the service so you don't have to run it like this.

1 Like

Do you mean like this?

[root@localhost ~]# systemctl start elasticsearch-8.4.3
Failed to start elasticsearch-8.4.3.service: Unit not found.
[elastic@localhost root]$ systemctl start elasticsearch
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Failed to start elasticsearch.service: Unit not found.

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