gpt4 book ai didi

java - ElasticSearch 服务无法启动。找不到 JVM

转载 作者:可可西里 更新时间:2023-11-01 12:42:18 27 4
gpt4 key购买 nike

我有一个全新的 Windows Server 2012,并使用 service install 安装了 ElasticSearch 服务。当我尝试启动它时,它无法启动(退出代码 1)。

查看日志它找不到 JVM 的路径:

[2016-05-25 19:10:22] [info]  [ 1964] Commons Daemon procrun (1.0.15.0 64-bit) started
[2016-05-25 19:10:22] [info] [ 1964] Starting service 'elasticsearch-service-x64' ...
[2016-05-25 19:10:22] [info] [ 2508] Commons Daemon procrun (1.0.15.0 64-bit) started
[2016-05-25 19:10:22] [info] [ 2508] Running 'elasticsearch-service-x64' Service...
[2016-05-25 19:10:22] [info] [ 2968] Starting service...
[2016-05-25 19:10:22] [error] [ 2968] Failed creating java %JAVA_HOME%\jre\bin\server\jvm.dll
[2016-05-25 19:10:22] [error] [ 2968] The system cannot find the path specified.
[2016-05-25 19:10:22] [error] [ 2968] ServiceStart returned 1
[2016-05-25 19:10:22] [error] [ 2968] The system cannot find the path specified.
[2016-05-25 19:10:22] [info] [ 2508] Run service finished.
[2016-05-25 19:10:22] [info] [ 2508] Commons Daemon procrun finished
[2016-05-25 19:10:24] [error] [ 1964] Failed to start 'elasticsearch-service-x64' service
[2016-05-25 19:10:24] [error] [ 1964] The data area passed to a system call is too small.
[2016-05-25 19:10:24] [info] [ 1964] Start service finished.
[2016-05-25 19:10:24] [error] [ 1964] Commons Daemon procrun failed with exit value: 5 (Failed to start service)
[2016-05-25 19:10:24] [error] [ 1964] The data area passed to a system call is too small.

但是,JAVA_HOME 变量设置正确:

C:\elasticsearch-2.3.3\elasticsearch-2.3.3\bin>dir "%JAVA_HOME%\jre\bin\server\"
Volume in drive C has no label.
Volume Serial Number is 6F6F-14E6

Directory of C:\Program Files\Java\jdk1.8.0_92\jre\bin\server

05/25/2016 06:22 PM <DIR> .
05/25/2016 06:22 PM <DIR> ..
05/25/2016 06:22 PM 19,136,512 classes.jsa
05/25/2016 06:21 PM 8,775,712 jvm.dll
05/25/2016 06:21 PM 1,423 Xusage.txt
3 File(s) 27,913,647 bytes
2 Dir(s) 121,919,512,576 bytes free

我正在以管理员身份运行控制台。

有什么建议吗?

最佳答案

刚找到解决方案。我将 JAVA_HOME 变量从用户变量移到了系统变量。

现在服务正在运行。

关于java - ElasticSearch 服务无法启动。找不到 JVM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37445810/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com