I use rpm installed elasticsearch-1.7.3, It work, then I use rpm uninstall it. Because I want to install 5.xx.
So I use the same way to install elasticsearch-5.4.3, But when I restart elasticsearch, It don't work.
# ======================== 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: my-application
#
# ------------------------------------ Node ------------------------------------
#
# 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: /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 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: 192.168.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 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 master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery 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:
#
#action.destructive_requires_name: true
[2017-07-01T17:52:12,513][ERROR][o.e.g.GatewayMetaState ] [YPTbq-O] failed to read local state, exiting... org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:0, legacy:false, file:/var/lib/elasticsearch/elasticsearch/nodes/0/indices/jobbole/_state/state-0.st]
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 六 2017-07-01 17:25:19 CST; 55s ago
Docs: http://www.elastic.co
Process: 2100 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
Process: 2086 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 2100 (code=exited, status=1/FAILURE)
7月 01 17:24:14 localhost.localdomain systemd[1]: Starting Elasticsearch...
7月 01 17:24:15 localhost.localdomain systemd[1]: Started Elasticsearch.
7月 01 17:25:19 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
7月 01 17:25:19 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
7月 01 17:25:19 localhost.localdomain systemd[1]: elasticsearch.service failed.
[2017-07-01T17:52:12,513][ERROR][o.e.g.GatewayMetaState ] [YPTbq-O] failed to read local state, exiting...
org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:0, legacy:false, file:/var/lib/elasticsearch/elasticsearch/nodes/0/indices/jobbole/_state/state-0.st]
Delete the state-0.st
fille : sudo rm -rf /var/lib/elasticsearch/elasticsearch/nodes/0/
You can not upgrade from 1.x to 5.x, we offer zero backwards compatibility guarantees here. We only support upgrading from major version N to major version N + 1.
I am not able to start elasticsearch. The same error curl(7) failed to localhost.
I did try the solution mentioned above but to no avail!
Help ASAP!
@ArunaMaurya221B this description is not nearly sufficient. Is there something in logs? What version do you run, on which OS, do you use systemctl
, if so then what does systemctl status elasticsearch.service
show?
elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
elasticsearch.service: Unit entered failed state.
elasticsearch.service: Failed with result 'exit-code'.
Somebody have more details about this ?
I have the same Problem, complete details from elasticsearch.log after starting service:
[2018-02-25T11:04:56,383][INFO ][o.e.n.Node ] [] initializing ...
[2018-02-25T11:04:56,431][INFO ][o.e.e.NodeEnvironment ] [vvPQzWL] using [1] data paths, mounts [[/ (/dev/sdb5)]], net usable_space [306.4gb], net total_space [456.9gb], spins? [no], types [ext4]
[2018-02-25T11:04:56,431][INFO ][o.e.e.NodeEnvironment ] [vvPQzWL] heap size [1.9gb], compressed ordinary object pointers [true]
[2018-02-25T11:04:56,432][INFO ][o.e.n.Node ] node name [vvPQzWL] derived from node ID [vvPQzWLxTc-J-cg_MDW5lw]; set [node.name] to override
[2018-02-25T11:04:56,433][INFO ][o.e.n.Node ] version[5.2.2], pid[14674], build[f9d9b74/2017-02-24T17:26:45.835Z], OS[Linux/4.13.0-32-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_151/25.151-b12]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [aggs-matrix-stats]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [ingest-common]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [lang-expression]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [lang-groovy]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [lang-mustache]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [lang-painless]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [percolator]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [reindex]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [transport-netty3]
[2018-02-25T11:04:56,868][INFO ][o.e.p.PluginsService ] [vvPQzWL] loaded module [transport-netty4]
[2018-02-25T11:04:56,869][INFO ][o.e.p.PluginsService ] [vvPQzWL] no plugins loaded
[2018-02-25T11:04:57,205][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:536) ~[?:1.8.0_151]
at org.elasticsearch.monitor.os.OsProbe.getControlGroups(OsProbe.java:216) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsProbe.getCgroup(OsProbe.java:414) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsProbe.osStats(OsProbe.java:466) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsService.
at org.elasticsearch.monitor.MonitorService.
at org.elasticsearch.node.Node.
at org.elasticsearch.node.Node.
at org.elasticsearch.bootstrap.Bootstrap$6.
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.2.2.jar:5.2.2]
[2018-02-25T11:04:57,209][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: No match found
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.2.2.jar:5.2.2]
Caused by: java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:536) ~[?:1.8.0_151]
at org.elasticsearch.monitor.os.OsProbe.getControlGroups(OsProbe.java:216) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsProbe.getCgroup(OsProbe.java:414) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsProbe.osStats(OsProbe.java:466) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.monitor.os.OsService.
at org.elasticsearch.monitor.MonitorService.
at org.elasticsearch.node.Node.
at org.elasticsearch.node.Node.
at org.elasticsearch.bootstrap.Bootstrap$6.
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.2.jar:5.2.2]
... 6 more
Please don't add comments on a closed issue - instead raise this on our forums at discuss.elastic.co where we can give better support.
Hello, you can see best details on journalctl, for me it was just jvm memory adjustment.
I am new to elasticsearch and facing the below issue:
[elastic@elsqw1 elastic]$ systemctl status elasticsearch.service
â elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-05-30 12:42:49 AST; 6min ago
Docs: http://www.elastic.co
Process: 42859 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 42859 (code=exited, status=1/FAILURE)
I increase the heap size even though the same situation.
-Xms8g
-Xmx8g
I also changed the data and log location. I have a mounted volume which I want to use for the data and log.
#
#
path.data: /u001/elastic/data/elasticsearch
#
#
path.logs: /u001/elastic/log/elasticsearch
@bqayyum better chance to ask on discuss.elastic.co where we can give a better help.
for me I got the status of the service sudo service elasticsearch status
this gave me the amongst other things the command that was run to start elasticsearch. I just ran that command manually at the command line and it gave me the full set of error messages as to why it could not start. In my case I had put the my mysql.jar file in the modules folder and elasticsearch didn't like that.
Solution
[2017-07-01T17:52:12,513][ERROR][o.e.g.GatewayMetaState ] [YPTbq-O] failed to read local state, exiting... org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:0, legacy:false, file:/var/lib/elasticsearch/elasticsearch/nodes/0/indices/jobbole/_state/state-0.st]
Delete the
state-0.st
fille :sudo rm -rf /var/lib/elasticsearch/elasticsearch/nodes/0/
Worked like charm!!!
SUPER
In my case I had to run: sudo rm -rf /var/lib/elasticsearch/*
before it would work. I had previously had installed version 7.8, but had to downgrade to 6.5, and then I started facing these issues.
But beware, it might delete any data you have, but in my case, it was a fresh install.
same problem, everything worked after sudo dpkg --configure -a
same problem, everything worked after
sudo dpkg --configure -a
thank uuu
Most helpful comment
Solution
[2017-07-01T17:52:12,513][ERROR][o.e.g.GatewayMetaState ] [YPTbq-O] failed to read local state, exiting... org.elasticsearch.ElasticsearchException: java.io.IOException: failed to read [id:0, legacy:false, file:/var/lib/elasticsearch/elasticsearch/nodes/0/indices/jobbole/_state/state-0.st]
Delete the
state-0.st
fille :sudo rm -rf /var/lib/elasticsearch/elasticsearch/nodes/0/