简体   繁体   中英

Error when running ElasticSearch as daemon in Ubuntu

I get the following error while running elasticsearch as daemon in ubuntu:

daemon: fatal: failed to tell if ./elasticsearch is safe: No such file or directory

However, when I try to run the command manually it works:

./bin/elasticsearch -d -p pid

Please advise how to fix this.

I think it was my miss. Apparently, I installed an incorrect package, I installed from TAR. Whereas, I was supposed to install from DEB.

So, I followed this document from Elastic.

Installing from the APT repository

You may need to install the apt-transport-https package on Debian before proceeding:

sudo apt-get install apt-transport-https

Save the repository definition to /etc/apt/sources.list.d/elastic-6.x.list:

echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list

sudo apt-get update && sudo apt-get install elasticsearch

But since I wanted a particular version 6.2.4, I used this:
sudo apt-get update && sudo apt-get install elasticsearch=6.2.4

Running Elasticsearch with SysV initedit
Use the update-rc.d command to configure Elasticsearch to start automatically when the system boots up:

sudo update-rc.d elasticsearch defaults 95 10

Elasticsearch can be started and stopped using the service command:

sudo -i service elasticsearch start
sudo -i service elasticsearch stop

If Elasticsearch fails to start for any reason, it will print the reason for failure to STDOUT. Log files can be found in /var/log/elasticsearch/.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM