title: Elasticsearch is not starting after re-installation
body: <p>I recently noted that Elasticsearch was not starting after a reboot. Eventualy I deleted it and re-installed from scratch. However I'm still having the same problem. When I try to start it, systemctl shows the following status:</p>
  <pre><code>$ sudo systemctl status elasticsearch
  ● elasticsearch.service - Elasticsearch
       Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
       Active: failed (Result: timeout) since Wed 2020-09-16 16:22:32 EDT; 3min 23s ago
         Docs: https://www.elastic.co
      Process: 1716 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=143)
     Main PID: 1716 (code=exited, status=143)
  
  Sep 16 16:20:59 enk-network-sniffer systemd[1]: Starting Elasticsearch...
  Sep 16 16:22:29 enk-network-sniffer systemd[1]: elasticsearch.service: start operation timed out. Terminating.
  Sep 16 16:22:32 enk-network-sniffer systemd[1]: elasticsearch.service: Failed with result 'timeout'.
  Sep 16 16:22:32 enk-network-sniffer systemd[1]: Failed to start Elasticsearch.
  </code></pre>
  <p>Looking at</p>
  <blockquote>
  <p>/var/log/elasticsearch/elasticsearch.log</p>
  </blockquote>
  <p>shows the following logs:</p>
  <pre><code>   [2020-09-16T16:42:33,268][INFO ][o.e.e.NodeEnvironment    ] [enk-network-sniffer] using [1] data paths, mounts [[/ (/dev/sda5)]], net usable_space [23.4gb], net total_space [38.6gb], types [ext4]
  [2020-09-16T16:42:33,301][INFO ][o.e.e.NodeEnvironment    ] [enk-network-sniffer] heap size [1gb], compressed ordinary object pointers [true]
  [2020-09-16T16:42:33,717][INFO ][o.e.n.Node               ] [enk-network-sniffer] node name [enk-network-sniffer], node ID [RljBYx0ZQx6E87E__MV3gQ], cluster name [elasticsearch]
  [2020-09-16T16:42:33,720][INFO ][o.e.n.Node               ] [enk-network-sniffer] version[7.7.1], pid[1690], build[default/deb/ad56dce891c901a492bb1ee393f12dfff473a423/2020-05-28T16:30:01.040088Z], OS[Linux/5.4.0-47-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/14.0.1/14.0.1+7]
  [2020-09-16T16:42:33,721][INFO ][o.e.n.Node               ] [enk-network-sniffer] JVM home [/usr/share/elasticsearch/jdk]
  [2020-09-16T16:42:33,722][INFO ][o.e.n.Node               ] [enk-network-sniffer] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/elasticsearch-8868144046098870714, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
  [2020-09-16T16:42:54,521][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [aggs-matrix-stats]
  [2020-09-16T16:42:54,522][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [analysis-common]
  [2020-09-16T16:42:54,531][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [constant-keyword]
  [2020-09-16T16:42:54,531][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [flattened]
  [2020-09-16T16:42:54,532][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [frozen-indices]
  [2020-09-16T16:42:54,535][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-common]
  [2020-09-16T16:42:54,535][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-geoip]
  [2020-09-16T16:42:54,536][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-user-agent]
  [2020-09-16T16:42:54,538][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-expression]
  [2020-09-16T16:42:54,539][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-mustache]
  [2020-09-16T16:42:54,543][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-painless]
  [2020-09-16T16:42:54,543][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [mapper-extras]
  [2020-09-16T16:42:54,547][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [parent-join]
  [2020-09-16T16:42:54,548][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [percolator]
  [2020-09-16T16:42:54,551][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [rank-eval]
  [2020-09-16T16:42:54,552][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [reindex]
  [2020-09-16T16:42:54,552][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [repository-url]
  [2020-09-16T16:42:54,555][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [search-business-rules]
  [2020-09-16T16:42:54,556][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [spatial]
  [2020-09-16T16:42:54,556][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [systemd]
  [2020-09-16T16:42:54,561][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [tasks]
  [2020-09-16T16:42:54,562][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [transform]
  [2020-09-16T16:42:54,562][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [transport-netty4]
  [2020-09-16T16:42:54,565][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [vectors]
  [2020-09-16T16:42:54,567][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-analytics]
  [2020-09-16T16:42:54,571][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-async-search]
  [2020-09-16T16:42:54,574][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-autoscaling]
  [2020-09-16T16:42:54,574][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ccr]
  [2020-09-16T16:42:54,577][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-core]
  [2020-09-16T16:42:54,580][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-deprecation]
  [2020-09-16T16:42:54,581][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-enrich]
  [2020-09-16T16:42:54,582][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-eql]
  [2020-09-16T16:42:54,583][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-graph]
  [2020-09-16T16:42:54,586][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-identity-provider]
  [2020-09-16T16:42:54,588][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ilm]
  [2020-09-16T16:42:54,592][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-logstash]
  [2020-09-16T16:42:54,593][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ml]
  [2020-09-16T16:42:54,594][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-monitoring]
  [2020-09-16T16:42:54,602][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ql]
  [2020-09-16T16:42:54,602][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-rollup]
  [2020-09-16T16:42:54,602][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-security]
  [2020-09-16T16:42:54,612][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-sql]
  [2020-09-16T16:42:54,612][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-voting-only-node]
  [2020-09-16T16:42:54,633][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-watcher]
  [2020-09-16T16:42:54,634][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] no plugins loaded
  </code></pre>
  <p>I'm not being able to find any error or warning in these files. Any idea on what might be wrong or where else I can look at to find more clues?</p>
  <p>UPDATE:</p>
  <p>Here is the /etc/elasticsearch/elasticsearch.yml file:</p>
  <pre><code>#
  # Use a descriptive name for the node:
  #
  #node.name: node-1
  #
  # Add custom attributes to the node:
  #
  #node.attr.rack: r1
  #
  # ----------------------------------- Paths ------------------------------------
  #
  # Path to directory where to store the data (separate multiple locations by comma):
  #
  path.data: /var/lib/elasticsearch
  #
  # Path to log files:
  #
  path.logs: /var/log/elasticsearch
  #
  # ----------------------------------- Memory -----------------------------------
  #
  # Lock the memory on startup:
  #
  #bootstrap.memory_lock: true
  #
  # Make sure that the heap size is set to about half the memory available
  # on the system and that the owner of the process is allowed to use this
  # limit.
  #
  # Elasticsearch performs poorly when the system is swapping the memory.
  #
  # ---------------------------------- Network -----------------------------------
  #
  # Set the bind address to a specific IP (IPv4 or IPv6):
  #
  network.host: 0.0.0.0
  #
  # 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 [&quot;127.0.0.1&quot;, &quot;[::1]&quot;]
  #
  #discovery.seed_hosts: [&quot;host1&quot;, &quot;host2&quot;]
  #
  # Bootstrap the cluster using an initial set of master-eligible nodes:
  #
  #cluster.initial_master_nodes: [&quot;node-1&quot;, &quot;node-2&quot;]
  #
  discovery.type: single-node
  cluster.initial_master_nodes: []
  # For more information, consult the discovery and cluster formation module documentation.
  #
  # ---------------------------------- Gateway -----------------------------------
  #
  # Block initial recovery after a full cluster restart until N nodes are started:
  #
  #gateway.recover_after_nodes: 3
  #
  # For more information, consult the gateway module documentation.
  #
  # ---------------------------------- Various -----------------------------------
  #
  # Require explicit names when deleting indices:
  #
  </code></pre>
  <p>After increasing the heap size, I obtained the following logs:</p>
  <pre><code>[2020-09-17T11:47:21,107][INFO ][o.e.e.NodeEnvironment    ] [enk-network-sniffer] using [1] data paths, mounts [[/ (/dev/sda5)]], net usable_space [174.4gb], net total_space [196.1gb], types [ext4]
  [2020-09-17T11:47:21,129][INFO ][o.e.e.NodeEnvironment    ] [enk-network-sniffer] heap size [4gb], compressed ordinary object pointers [true]
  [2020-09-17T11:47:23,118][INFO ][o.e.n.Node               ] [enk-network-sniffer] node name [enk-network-sniffer], node ID [RljBYx0ZQx6E87E__MV3gQ], cluster name [elasticsearch]
  [2020-09-17T11:47:23,128][INFO ][o.e.n.Node               ] [enk-network-sniffer] version[7.7.1], pid[1966], build[default/deb/ad56dce891c901a492bb1ee393f12dfff473a423/2020-05-28T16:30:01.040088Z], OS[Linux/5.4.0-47-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/14.0.1/14.0.1+7]
  [2020-09-17T11:47:23,129][INFO ][o.e.n.Node               ] [enk-network-sniffer] JVM home [/usr/share/elasticsearch/jdk]
  [2020-09-17T11:47:23,129][INFO ][o.e.n.Node               ] [enk-network-sniffer] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms4g, -Xmx4g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/tmp/elasticsearch-11788675126322072724, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=2147483648, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
  [2020-09-17T11:47:54,845][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [aggs-matrix-stats]
  [2020-09-17T11:47:54,845][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [analysis-common]
  [2020-09-17T11:47:54,849][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [constant-keyword]
  [2020-09-17T11:47:54,850][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [flattened]
  [2020-09-17T11:47:54,850][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [frozen-indices]
  [2020-09-17T11:47:54,850][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-common]
  [2020-09-17T11:47:54,850][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-geoip]
  [2020-09-17T11:47:54,851][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [ingest-user-agent]
  [2020-09-17T11:47:54,852][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-expression]
  [2020-09-17T11:47:54,852][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-mustache]
  [2020-09-17T11:47:54,853][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [lang-painless]
  [2020-09-17T11:47:54,853][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [mapper-extras]
  [2020-09-17T11:47:54,854][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [parent-join]
  [2020-09-17T11:47:54,854][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [percolator]
  [2020-09-17T11:47:54,855][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [rank-eval]
  [2020-09-17T11:47:54,855][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [reindex]
  [2020-09-17T11:47:54,856][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [repository-url]
  [2020-09-17T11:47:54,856][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [search-business-rules]
  [2020-09-17T11:47:54,856][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [spatial]
  [2020-09-17T11:47:54,856][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [systemd]
  [2020-09-17T11:47:54,857][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [tasks]
  [2020-09-17T11:47:54,857][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [transform]
  [2020-09-17T11:47:54,858][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [transport-netty4]
  [2020-09-17T11:47:54,858][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [vectors]
  [2020-09-17T11:47:54,859][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-analytics]
  [2020-09-17T11:47:54,860][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-async-search]
  [2020-09-17T11:47:54,860][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-autoscaling]
  [2020-09-17T11:47:54,860][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ccr]
  [2020-09-17T11:47:54,861][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-core]
  [2020-09-17T11:47:54,861][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-deprecation]
  [2020-09-17T11:47:54,862][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-enrich]
  [2020-09-17T11:47:54,862][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-eql]
  [2020-09-17T11:47:54,862][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-graph]
  [2020-09-17T11:47:54,863][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-identity-provider]
  [2020-09-17T11:47:54,863][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ilm]
  [2020-09-17T11:47:54,864][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-logstash]
  [2020-09-17T11:47:54,864][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ml]
  [2020-09-17T11:47:54,865][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-monitoring]
  [2020-09-17T11:47:54,867][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-ql]
  [2020-09-17T11:47:54,868][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-rollup]
  [2020-09-17T11:47:54,868][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-security]
  [2020-09-17T11:47:54,868][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-sql]
  [2020-09-17T11:47:54,869][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-voting-only-node]
  [2020-09-17T11:47:54,869][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] loaded module [x-pack-watcher]
  [2020-09-17T11:47:54,870][INFO ][o.e.p.PluginsService     ] [enk-network-sniffer] no plugins loaded
  </code></pre>
  <p>ES is still failing to start.</p>
  <p>Thanks.</p>