Failed to start Elasticsearch on windows

I failed to start Elasticsearch8.5.1 and 8.6.0 locally, but 8.2.2 and 8.4.1 can start normally.
anyone know what the problem?

report errors:

warning: ignoring JAVA_HOME=C:\Program Files\Java\jdk-17.0.4.1; using bundled JDK
[2023-01-16T12:01:06,076][ERROR][o.e.b.Elasticsearch      ] [A11181221041080] fatal exception while booting Elasticsearchjava.nio.file.InvalidPathException: Trailing char < > at index 0:
        at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:191)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)

log:

[2023-01-16T12:01:06,076][ERROR][o.e.b.Elasticsearch      ] [A11181221041080] fatal exception while booting Elasticsearch
java.nio.file.InvalidPathException: Trailing char < > at index 0:  
	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:191) ~[?:?]
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:?]
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:?]
	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[?:?]
	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232) ~[?:?]
	at org.elasticsearch.core.PathUtils.get(PathUtils.java:47) ~[elasticsearch-core-8.6.0.jar:?]
	at org.elasticsearch.jdk.JarHell.parseClassPath(JarHell.java:150) ~[elasticsearch-core-8.6.0.jar:?]
	at org.elasticsearch.jdk.JarHell.parseClassPath(JarHell.java:93) ~[elasticsearch-core-8.6.0.jar:?]
	at org.elasticsearch.jdk.JarHell.checkJarHell(JarHell.java:84) ~[elasticsearch-core-8.6.0.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:180) ~[elasticsearch-8.6.0.jar:?]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:66) ~[elasticsearch-8.6.0.jar:?]

[2023-01-16T12:01:06,076][ERROR][o.e.b.Elasticsearch ] [A11181221041080] fatal exception while booting Elasticsearch
java.nio.file.InvalidPathException: Trailing char < > at index 0:

It might be something wrong in yml. Can you post elasticsearch.yml? Use https://www.yamllint.com/ for the validation.

Same for me I cannot start the Windows service on 8.5.3 or 8.6.0, but I get another error. Any ideas?

https://discuss.elastic.co/t/after-upgrade-from-8-2-2-to-8-5-3-elasticsearch-bat-works-just-fine-but-the-elasticsearch-service-bat-start-fails/322167/2

Thanks!

/Kristoffer

Updated without any problems, Win 10 and Centos.

How did you upgrade? From zip?ES was installed as the service? If did, remove the service, install and run.

Hi,
Now I got it to work. I used:

 elasticsearch-service.bat remove 

to remove the existing one and then

 elasticsearch-service.bat install

and the service started.

/Kristoffer

1 Like

Well done.
You can use: elasticsearch-service.bat install <servicename>
You can change params: elasticsearch-service.bat manager <servicename>

1 Like