Elasticsearch Fails to Start Java Lang Illegal State Exception: No match found

Hello folks, I have been trying to get Elastic Stack to run for at least 2 days now, I have been given a project in school that requires me to use Elasticsearch 5.2.0 specifically (Logstash 5.2.0, and Kibana 5.2.0) I have not been able to get past installing Elasticsearch yet because it always fails to run the service. I have Java8 and Java11 (using Java8 for ES 5.2.0). The service always fails to run and anytime I check the error logs I keep getting the below:

[2022-11-17T20:37:58,110][INFO ][o.e.p.PluginsService     ] [F-2-m97] loaded module [reindex]
[2022-11-17T20:37:58,110][INFO ][o.e.p.PluginsService     ] [F-2-m97] loaded module [transport-netty3]
[2022-11-17T20:37:58,110][INFO ][o.e.p.PluginsService     ] [F-2-m97] loaded module [transport-netty4]
[2022-11-17T20:37:58,110][INFO ][o.e.p.PluginsService     ] [F-2-m97] no plugins loaded
[2022-11-17T20:37:58,779][ERROR][o.e.b.Bootstrap          ] Exception
java.lang.IllegalStateException: No match found
        at java.util.regex.Matcher.group(Matcher.java:645) ~[?:?]
        at org.elasticsearch.monitor.os.OsProbe.getControlGroups(OsProbe.java:216) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsProbe.getCgroup(OsProbe.java:414) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsProbe.osStats(OsProbe.java:466) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsService.<init>(OsService.java:45) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.MonitorService.<init>(MonitorService.java:45) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.node.Node.<init>(Node.java:345) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.2.0.jar:5.2.0]
[2022-11-17T20:37:58,788][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.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) ~[elasticsearch-5.2.0.jar:5.2.0]
Caused by: java.lang.IllegalStateException: No match found
        at java.util.regex.Matcher.group(Matcher.java:645) ~[?:?]
        at org.elasticsearch.monitor.os.OsProbe.getControlGroups(OsProbe.java:216) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsProbe.getCgroup(OsProbe.java:414) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsProbe.osStats(OsProbe.java:466) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.os.OsService.<init>(OsService.java:45) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.monitor.MonitorService.<init>(MonitorService.java:45) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.node.Node.<init>(Node.java:345) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-5.2.0.jar:5.2.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-5.2.0.jar:5.2.0]
        ... 6 more

I have checked almost all online resource there is, with no luck! No one has a solution to this issue, at least not one I have been able to figure out... Does anyone have a fix for this?

Welcome to our community! :smiley:

Can you post your elasticsearch.yml please?

Hello Mark, Thank you!

Here is the elasticsearch.yml file:

# ======================== 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: 10.0.0.4
#
# 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

I really hope this can get resolved today!

What operating system are you deploying on? What type of hardware?

Hello, I am using a Microsoft Azure VM running Linux Ubuntu 20.04 (ubuntu-server-focal), 16GB RAM, 2 CPUs, 128GB Hard Disk.

I was told by @jasontedor on the GitHub thread (ES doesn't start due to a problem with REGEX matching of entries in '/proc/self/cgroup' · Issue #23218 · elastic/elasticsearch · GitHub) to upgrade to v5.2.2 to solve the issue (because of it's backward compatibility with v5.2.0), however I encounter the same exact issue on that v5.2.2

[2022-11-18T14:57:54,900][INFO ][o.e.n.Node               ] [] initializing ...
[2022-11-18T14:57:54,996][INFO ][o.e.e.NodeEnvironment    ] [5Yuafc8] using [1] data paths, mounts [[/ (/dev/root)]], net usable_space [26.5gb], net total_space [28.8gb], spins? [possibly], types [ext4]
[2022-11-18T14:57:54,996][INFO ][o.e.e.NodeEnvironment    ] [5Yuafc8] heap size [1.9gb], compressed ordinary object pointers [true]
[2022-11-18T14:57:54,998][INFO ][o.e.n.Node               ] node name [5Yuafc8] derived from node ID [5Yuafc8cTMyJO3VwKScGpA]; set [node.name] to override
[2022-11-18T14:57:55,000][INFO ][o.e.n.Node               ] version[5.2.2], pid[9279], build[f9d9b74/2017-02-24T17:26:45.835Z], OS[Linux/5.15.0-1023-azure/amd64], JVM[Private Build/OpenJDK 64-Bit Server VM/1.8.0_352/25.352->
[2022-11-18T14:57:56,097][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [aggs-matrix-stats]
[2022-11-18T14:57:56,098][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [ingest-common]
[2022-11-18T14:57:56,098][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [lang-expression]
[2022-11-18T14:57:56,098][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [lang-groovy]
[2022-11-18T14:57:56,098][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [lang-mustache]
[2022-11-18T14:57:56,099][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [lang-painless]
[2022-11-18T14:57:56,099][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [percolator]
[2022-11-18T14:57:56,099][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [reindex]
[2022-11-18T14:57:56,099][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [transport-netty3]
[2022-11-18T14:57:56,099][INFO ][o.e.p.PluginsService     ] [5Yuafc8] loaded module [transport-netty4]
[2022-11-18T14:57:56,100][INFO ][o.e.p.PluginsService     ] [5Yuafc8] no plugins loaded
[2022-11-18T14:57:56,993][ERROR][o.e.b.Bootstrap          ] Exception
java.lang.IllegalStateException: No match found
        at java.util.regex.Matcher.group(Matcher.java:536) ~[?:1.8.0_352]
        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.<init>(OsService.java:45) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.monitor.MonitorService.<init>(MonitorService.java:45) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:345) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]
        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]
[2022-11-18T14:57:57,003][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_352]
        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.<init>(OsService.java:45) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.monitor.MonitorService.<init>(MonitorService.java:45) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:345) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:232) ~[elasticsearch-5.2.2.jar:5.2.2]
        at org.elasticsearch.bootstrap.Bootstrap$6.<init>(Bootstrap.java:241) ~[elasticsearch-5.2.2.jar:5.2.2]
        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

I am doing anything wrong? This is taking too much of time to setup... I am using OpenJDK-8-jre as the Java runtime environment. The Ubuntu machine I am running is a fresh install and all the depencies on there are managed and installed by me. So there can be no conflicts there I assume... I have had to deploy three vm's for testing and to no luck!

Given that the version you are using is very old, I would recommend looking at the support matrix and make sure you use an operating system that is officially supported. It may work on newer versions, but I have not touched the version you are trying to use in years, so do not know.

THank you, I will try the supported version now, and let you know how it goes!

Hello, apparently the problem was not with the ELK stack version, but with the OS version (see Elastic Support Matrix. I had to downgrade from Ubuntu 20.04 to Ubuntu 16.04 because ES 5.2.* works well on 16.04 but with some of its own bugs. Thanks for your help!

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