Hi, I can't seem to start ES inside my Centos 7 container. I am using mac --> multipass --> LXD --> LXC centos7.
So I can start ES with no errors if I remove site in my yml config like this:
network.host: ["_local_"]
But if I use
network.host: ["_local_", "_site_"]
It gives me this error:
[root@master-1 ~]# systemctl restart elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
Welcome to our community!
Please don't post pictures of text or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: [_local_, _site_]
#
# Set a custom port for HTTP:
#
http.port: 9200
Version is:
[root@master-1 bin]# ./elasticsearch --version
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Version: 7.6.0, Build: default/rpm/7f634e9f44834fbc12724506cc1da681b0c3b1e3/2020-02-06T00:09:00.449973Z, JVM: 13.0.2
[root@master-1 bin]#
From journalctl -xe
--
-- Unit elasticsearch.service has begun starting up.
Jul 05 05:27:27 master-1 elasticsearch[9322]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be r
emoved in a future release.
Jul 05 05:28:00 master-1 elasticsearch[9322]: ERROR: [1] bootstrap checks failed
Jul 05 05:28:00 master-1 elasticsearch[9322]: [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Jul 05 05:28:00 master-1 elasticsearch[9322]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/playground.log
Jul 05 05:28:00 master-1 systemd[1]: elasticsearch.service: main process exited, code=exited, status=78/n/a
Jul 05 05:28:00 master-1 systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
it says: " max virtual memory areas vm.max_map_count [65530]"
So that is something to do with "site"? I remove "site" and it works just fine.
[root@master-1 elasticsearch]# rpm -qa | grep elas
elasticsearch-7.13.2-1.x86_64
[root@master-1 elasticsearch]# clear
[root@master-1 elasticsearch]# cat /etc/elasticsearch/elasticsearch.yml
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: playground
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: master-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 -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: [_local_]
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
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: ["10.41.55.114"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["master-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
node.master: true
node.data: false
node.ingest: true
node.ml: false
~
[root@master-1 elasticsearch]# systemctl start elasticsearch
Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[root@master-1 elasticsearch]# ^C
[root@master-1 elasticsearch]# ^C
[root@master-1 elasticsearch]# ^C
Now it's giving a different error from journalctl -xe
-
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: in 'reader', line 87, column 1:
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ~
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: could not find expected ':'
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: in 'reader', line 88, column 1:
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: at [Source: (sun.nio.ch.ChannelInputStream); line: 86, column: 15]]; nested: ScannerException[while scann
ing a simple key
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: in 'reader', line 87, column 1:
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ~
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: could not find expected ':'
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: in 'reader', line 88, column 1:
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: ];
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1102)
Jul 05 06:06:53 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1075)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:72)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:89)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:80)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.cli.Command.main(Command.java:79)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: while scanning a si
mple key
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: in 'reader', line 87, column 1:
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ~
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: could not find expected ':'
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: in 'reader', line 88, column 1:
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at [Source: (sun.nio.ch.ChannelInputStream); line: 86, column: 15]
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from(MarkedYAMLException.jav
a:27)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:359)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:41)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:634)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:609)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings.access$400(Settings.java:71)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1098)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ... 9 more
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: Caused by: while scanning a simple key
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: in 'reader', line 87, column 1:
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ~
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: could not find expected ':'
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: in 'reader', line 88, column 1:
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ^
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.scanner.ScannerImpl.stalePossibleSimpleKeys(ScannerImpl.java:464)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.scanner.ScannerImpl.needMoreTokens(ScannerImpl.java:278)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:168)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:355)
Jul 05 06:06:54 master-1 systemd-entrypoint[5037]: ... 14 more
Jul 05 06:06:54 master-1 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Jul 05 06:06:54 master-1 systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Jul 05 06:06:54 master-1 systemd[1]: Unit elasticsearch.service entered failed state.
Jul 05 06:06:54 master-1 systemd[1]: elasticsearch.s
If you connect to anything apart from localhost, which _site_ does, this triggers Elasticsearch to enforce bootstrap checks and this is what is failing according to your error messages. Have a look at the docs and the guidance around the different bootstrap checks.
Yeah something to do with bootstrap check. Now I got this error using the latest version of ES
-- Unit elasticsearch.service has begun starting up.
Jul 05 23:34:47 data-1 systemd-entrypoint[2193]: ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
Jul 05 23:34:47 data-1 systemd-entrypoint[2193]: bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Jul 05 23:34:47 data-1 systemd-entrypoint[2193]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/playground.log
Jul 05 23:34:47 data-1 systemd[1]: elasticsearch.service: main process exited, code=exited, status=78/n/a
Jul 05 23:34:47 data-1 systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
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.