I have been hosting elasticsearch locally on my computer for over 1 year. It has been operating perfectly. Earlier this morning, there was a power outage in my city which caused my computer to lose power and unexpectedly shutdown. When I got electricity back, I started up my computer. I ran the command systemctl start elasticsearch
, but it gave this error:
Jan 03 16:54:31 elk systemd-entrypoint[586]: Jan 03, 2025 4:54:31 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
Jan 03 16:54:31 elk systemd-entrypoint[586]: WARNING: COMPAT locale provider will be removed in a future release
Jan 03 16:54:47 elk systemd-entrypoint[586]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/demo.log
Jan 03 16:54:48 elk systemd-entrypoint[586]: ERROR: Elasticsearch died while starting up, with exit code 1
Jan 03 16:54:48 elk systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jan 03 16:54:48 elk systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Jan 03 16:54:48 elk systemd[1]: Failed to start Elasticsearch.
Jan 03 16:54:48 elk systemd[1]: elasticsearch.service: Consumed 42.521s CPU time.
When I did a cat /var/log/elasticsearch/demo.log
, I saw this errors:
[2025-01-03T16:54:47,623][ERROR][o.e.b.Elasticsearch ] [elk] fatal exception while booting Elasticsearch
java.lang.ExceptionInInitializerError: null
at org.apache.lucene.analysis.bg.BulgarianAnalyzer.<init>(BulgarianAnalyzer.java:88) ~[lucene-analysis-common-9.11.1.jar:?]
at org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory.<init>(PreBuiltAnalyzerProviderFactory.java:45) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.analysis.common.CommonAnalysisPlugin.getPreBuiltAnalyzerProviderFactories(CommonAnalysisPlugin.java:419) ~[?:?]
at org.elasticsearch.indices.analysis.AnalysisModule.setupPreBuiltAnalyzerProviderFactories(AnalysisModule.java:175) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.indices.analysis.AnalysisModule.<init>(AnalysisModule.java:88) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.node.NodeConstruction.createAnalysisRegistry(NodeConstruction.java:623) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:275) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.node.Node.<init>(Node.java:192) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:242) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:242) ~[elasticsearch-8.15.0.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:76) ~[elasticsearch-8.15.0.jar:?]
Caused by: java.io.UncheckedIOException: Unable to load default stopword set
at org.apache.lucene.analysis.bg.BulgarianAnalyzer$DefaultSetHolder.<clinit>(BulgarianAnalyzer.java:79) ~[lucene-analysis-common-9.11.1.jar:?]
... 11 more
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:279) ~[?:?]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:405) ~[?:?]
at sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:217) ~[?:?]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171) ~[?:?]
at java.io.InputStreamReader.read(InputStreamReader.java:186) ~[?:?]
at java.io.BufferedReader.fill(BufferedReader.java:160) ~[?:?]
at java.io.BufferedReader.implReadLine(BufferedReader.java:370) ~[?:?]
at java.io.BufferedReader.readLine(BufferedReader.java:347) ~[?:?]
at java.io.BufferedReader.readLine(BufferedReader.java:436) ~[?:?]
at org.apache.lucene.analysis.WordlistLoader.getWordSet(WordlistLoader.java:121) ~[lucene-core-9.11.1.jar:?]
at org.apache.lucene.analysis.WordlistLoader.getWordSet(WordlistLoader.java:145) ~[lucene-core-9.11.1.jar:?]
at org.apache.lucene.analysis.WordlistLoader.getWordSet(WordlistLoader.java:175) ~[lucene-core-9.11.1.jar:?]
at org.apache.lucene.analysis.WordlistLoader.getWordSet(WordlistLoader.java:159) ~[lucene-core-9.11.1.jar:?]
at org.apache.lucene.analysis.bg.BulgarianAnalyzer$DefaultSetHolder.<clinit>(BulgarianAnalyzer.java:71) ~[lucene-analysis-common-9.11.1.jar:?]
... 11 more
How do I get elasticsearch to work again?
Notes: I am using version 8 of elasticsearch. It is only a single node.