Elasticsearch – fehlerhaftes PlugIn
Fehler
Der Service Elasticsearch läuft nicht mehr. Nach dem Aufruf des Befehls wird folgende Info angezeigt
service elasticsearch status
elasticsearch.service – Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-02-13 17:18:11 CET; 11min ago
Docs: https://www.elastic.co
Process: 276781 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid –quiet (code=exited, status=1/FAILURE)
Main PID: 276781 (code=exited, status=1/FAILURE)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.cli.Command.main(Command.java:79)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Feb 13 17:18:10 nc01 systemd-entrypoint[276781]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
Feb 13 17:18:11 nc01 systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 17:18:11 nc01 systemd[1]: elasticsearch.service: Failed with result ‚exit-code‘.
Feb 13 17:18:11 nc01 systemd[1]: Failed to start Elasticsearch.
Logs
Nach Prüfung der Logs wird erkenntlich welches Problem existiert
vi /var/log/elasticsearch/elasticsearch.log
java.lang.IllegalArgumentException: Plugin [ingest-attachment] was built for Elasticsearch version 7.9.3 but version 7.11.0 is running
Vermutliche Ursache
Aktualisierung von Elasticsearch welches die Version des PlugIns nicht mehr unterstützt
Lösung
Entfernen Sie das fehlerhaft bzw. alte PlugIn und installieren es erneut. Durch die erneute Installation wird die funktionsfähige bzw. letzte Version installiert.
/usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment
/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment
Nun starten Sie den Service für Elasticsearch
service elasticsearch start
Im Anschluss wird der Status noch getestet bzw. geprüft
service elasticsearch start
Als Ergebnis der laufende Service
elasticsearch.service – Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-02-13 17:30:36 CET; 7s ago
Docs: https://www.elastic.co
Main PID: 277488 (java)
Tasks: 63 (limit: 6967)
Memory: 3.2G
CGroup: /system.slice/elasticsearch.service
├─277488 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch>
└─277703 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
Feb 13 17:30:07 nc01 systemd[1]: Starting Elasticsearch…
Feb 13 17:30:36 nc01 systemd[1]: Started Elasticsearch.