Elasticsearch doesn't start after editting conf file

I added new lines in /etc/elasticsearch/elasticsearch.yml and restart elasticsearch.

added lines : (tried to set kuromoji plugin as default analyzer)

index.analysis.analyzer.default.type: custom
index.analysis.analyzer.default.tokenizer: kuromoji_tokenizer

But it doesn't start and output following logs.

[root@localhost elasticsearch]# service elasticsearch status
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-12-08 08:37:31 UTC; 8s ago
     Docs: http://www.elastic.co
  Process: 8106 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -Des.pidfile=${PID_DIR}/elasticsearch.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
  Process: 8104 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
 Main PID: 8106 (code=exited, status=1/FAILURE)

Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: # path.logs: /path/to/logs
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: #
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: # ----------------------------------- Memory -----------------------------------
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: #
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: # Lock the memory on startup:
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: #
Dec 08 08:37:31 localhost.localdomain elasticsearch[8106]: # bootstrap.memory_lock: true
Dec 08 08:37:31 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Dec 08 08:37:31 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Dec 08 08:37:31 localhost.localdomain systemd[1]: elasticsearch.service failed.

elasticsearch.yml


# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
# path.data: /path/to/data
#
# Path to log files:
#
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.memory_lock: true
#
# Make sure that the `ES_HEAP_SIZE` environment variable 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: 192.168.33.10
#
# Set a custom port for HTTP:
#
 http.port: 9200
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
#
# discovery.zen.minimum_master_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true
index.analysis.analyzer.default.type: custom
index.analysis.analyzer.default.tokenizer: kuromoji_tokenizer

elasticsearch ver 2.4.2

any advice?

thanks.

You need to deleted the space characters at the start of the network.host and network.port lines. YAML uses whitespace indentation as part of its syntax so you need to make sure that these lines do not start with whitespace.

1 Like

it works!!!!

Thanks a lot!!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.