Elastic search not running on ubuntu 18.04

*I have installed the elasticsearch on my ubuntu 18.04 but when I start the service it is failing when I execute systemctl start elasticsearch
saying
elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   
Active: failed (Result: exit-code) since Thu 2020-07-09 20:51:13 PKT; 4s ago
     Docs: http://www.elastic.co
  Process: 11651 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
 Main PID: 11651 (code=exited, status=1/FAILURE)
Jul 09 20:51:05 ubuntu systemd[1]: Starting Elasticsearch...
Jul 09 20:51:05 ubuntu elasticsearch[11651]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will
Jul 09 20:51:13 ubuntu systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 09 20:51:13 ubuntu systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Jul 09 20:51:13 ubuntu systemd[1]: Failed to start Elasticsearch.

/****************************************************************************************** */

my elasticsearch.yml includes the following

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 127.0.0.1
#
# Set a custom port for HTTP:
#
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: ["host-1"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
node.name: node-1
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.

If anyone could help me out with this. I have the openjdk version "11.0.7" on my PC.

Upvotes: 0

Views: 2466

Answers (2)

RvL
RvL

Reputation: 21

Solution: Run

vim /etc/default/elasticsearch

and add the following line:

START_DAEMON=true

Upvotes: 2

Amit
Amit

Reputation: 32386

As you have not provided the complete error/exception log, I would suggest the easiest tarball installation on ubuntu by following this official installation guide and follow this and this thread if you get startup errors mentioned in these threads.

Upvotes: 0

Related Questions