-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Elasticsearch version (bin/elasticsearch --version):
Version: 6.6.0, Build: default/tar/a9861f4/2019-01-24T11:27:09.439740Z, JVM: 1.8.0_181
Plugins installed: []
JVM version (java -version):
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
OS version (uname -a if on a Unix-like system):
Linux 4.14.94-73.73.amzn1.x86_64 #1 SMP Tue Jan 22 20:25:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
When xpack watcher is disabled and Elasticsearch is shutdown an NPE is thrown. When xpack watcher is disabled Elasticsearch should not throw NPE when shutting down. With xpack watcher enabled then NPE is not thrown.
Steps to reproduce:
- Download Elasticsearch 6.6.0
- Add xpack.watcher.enabled: false to elasticsearch.yml
- Start Elasticsearch then stop it, NPE is thrown.
Provide logs (if relevant):
[2019-02-12T11:39:27,043][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [Oec7bQh] uncaught exception in thread [Thread-2]
java.lang.NullPointerException: null
at org.elasticsearch.xpack.watcher.Watcher.close(Watcher.java:700) ~[?:?]
at org.elasticsearch.core.internal.io.IOUtils.close(IOUtils.java:103) ~[elasticsearch-core-6.6.0.jar:6.6.0]
at org.elasticsearch.core.internal.io.IOUtils.close(IOUtils.java:85) ~[elasticsearch-core-6.6.0.jar:6.6.0]
at org.elasticsearch.node.Node.close(Node.java:919) ~[elasticsearch-6.6.0.jar:6.6.0]
at org.elasticsearch.core.internal.io.IOUtils.close(IOUtils.java:103) ~[elasticsearch-core-6.6.0.jar:6.6.0]
at org.elasticsearch.core.internal.io.IOUtils.close(IOUtils.java:61) ~[elasticsearch-core-6.6.0.jar:6.6.0]
at org.elasticsearch.bootstrap.Bootstrap$4.run(Bootstrap.java:184) ~[elasticsearch-6.6.0.jar:6.6.0]