I am not able to start elastic search 7.4.2 as service while using elastic search-7.4.2.zip file in centos.
Process of instalaltion:
Step1 : download zip file
Step 2: Extract in folder
Step3 : Create service (elasticsearch-7.4.2.service) file in /usr/lib/systemd/system
service file content is given below -
[Unit]
Description=Elasticsearch-7.4.2
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Environment=ES_HOME=/opt/elasticsearch-7.4.2
Environment=CONF_DIR=/opt/elasticsearch-7.4.2/config
Environment=DATA_DIR=/opt/elasticsearch-7.4.2/data
Environment=LOG_DIR=/opt/elasticsearch-7.4.2/logs
Environment=PID_DIR=/opt/elasticsearch-7.4.2
EnvironmentFile=-/opt/elasticsearch-7.4.2/elasticsearch-7.4.2
After starting elastic search
sudo systemctl start elasticsearch-7.4.2.service , i am getting error like below
sudo systemctl status elasticsearch-7.4.2.service
elasticsearch-7.4.2.service: main process exited, code=exited, status=1/FAILURE
Unit elasticsearch-7.4.2.service entered failed state.
elasticsearch-7.4.2.service failed.
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.
Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.
Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.
It would be great if you could update your post to solve this.
Hi,
Thanks for your reply,
Yes already i have verified with rpm , it is working fine but my challenge is use zip file where need to create service file manually.
I have mentioned two scenario for zip file
Scenario 1:
after installing execute ./elasticsearch & from bin file on that time it was working fine.
Scenario 2:
After installing and creating service file, execute the below command
systemctl start elasticsearch-7.4.2.service
systemctl status elasticsearch-7.4.2.service
on that time i am getting error
elasticsearch-7.4.2.service - Elasticsearch-7.4.2
Loaded: loaded (/usr/lib/systemd/system/elasticsearch-7.4.2.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-03-05 10:48:19 IST; 14s ago
Docs: http://www.elastic.co
Process: 24229 ExecStart=/opt/elasticsearch-7.4.2/bin/elasticsearch -p {PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs={LOG_DIR} -Edefault.path.data={DATA_DIR} -Edefault.path.conf={CONF_DIR} (code=exited, status=1/FAILURE)
Main PID: 24229 (code=exited, status=1/FAILURE)
elasticsearch-7.4.2.service: main process exited, code=exited, status=1/FAILURE
Unit elasticsearch-7.4.2.service entered failed state.
elasticsearch-7.4.2.service failed
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.