0
*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.

  • please provide the entire error/exception logs – Amit Jul 10 '20 at 01:15
  • Set [trace](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#configuring-logging-levels) logging level and try again, than provide logs please – Tarasovych Jul 10 '20 at 05:57
  • @m.usama its been quite some time, it would be great if you can upvote and accept the answer if it was useful for you and let me know if you need more info – Amit Aug 04 '20 at 08:46

2 Answers2

2

Solution: Run

vim /etc/default/elasticsearch

and add the following line:

START_DAEMON=true
fcdt
  • 2,241
  • 5
  • 11
  • 26
RvL
  • 21
  • 6
0

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.

Amit
  • 25,499
  • 6
  • 44
  • 72