hi,
i coonfigure the elasticsearch.yml and jvm.option, can work normally in cmd window, but when i put it as a window service, it can start and running, after several seconds, it stop the service, error log as below, i use openjdk 11 in local environment
[2020-11-18T11:20:16,872][WARN ][stderr] [sw-node-1] java.lang.NoClassDefFoundError: java/util/logging/Logger
[2020-11-18T11:20:16,875][WARN ][stderr] [sw-node-1] at com.sun.jna.Native.<clinit>(Native.java:114)
[2020-11-18T11:20:16,876][WARN ][stderr] [sw-node-1] at java.base/java.lang.Class.forName0(Native Method)
[2020-11-18T11:20:16,876][WARN ][stderr] [sw-node-1] at java.base/java.lang.Class.forName(Class.java:315)
[2020-11-18T11:20:16,877][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45)
[2020-11-18T11:20:16,877][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Spawner.spawnNativeController(Spawner.java:109)
[2020-11-18T11:20:16,877][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Spawner.spawnNativeControllers(Spawner.java:88)
[2020-11-18T11:20:16,878][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:173)
[2020-11-18T11:20:16,878][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
[2020-11-18T11:20:16,878][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
[2020-11-18T11:20:16,879][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
[2020-11-18T11:20:16,879][WARN ][stderr] [sw-node-1] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
[2020-11-18T11:20:16,879][WARN ][stderr] [sw-node-1] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
[2020-11-18T11:20:16,879][WARN ][stderr] [sw-node-1] at org.elasticsearch.cli.Command.main(Command.java:90)
[2020-11-18T11:20:16,880][WARN ][stderr ] [sw-node-1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
[2020-11-18T11:20:16,880][WARN ][stderr] [sw-node-1] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
[2020-11-18T11:20:16,881][WARN ][stderr] [sw-node-1] Caused by: java.lang.ClassNotFoundException: java.util.logging.Logger
[2020-11-18T11:20:16,881][WARN ][stderr] [sw-node-1] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
[2020-11-18T11:20:16,881][WARN ][stderr] [sw-node-1] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[2020-11-18T11:20:16,882][WARN ][stderr] [sw-node-1] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[2020-11-18T11:20:16,882][WARN ][stderr] [sw-node-1] ... 15 more
elasticsearch.yml as below:
cluster.name: sw-application
node.name: sw-node-1
network.host: machine ip
http.port: 9500
discovery.seed_hosts: ["machine ip"]
cluster.initial_master_nodes: ["sw-node-1"]
node.master: true
node.data: true
node.ingest: true
transport.tcp.port: 9501
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
bootstrap.memory_lock: true
bootstrap.system_call_filter: false
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true