Elasticsearch version: 5.0.2
Plugins installed: []
JVM version: 1.8.0_112
OS version: Windows
Description of the problem including expected versus actual behavior:
The service has been installed on Windows successfully. But when starting it, there is a message from Windows that it cannot be started
Steps to reproduce:
Provide logs (if relevant):
[2016-12-01 17:41:27] [info] [ 9068] Commons Daemon procrun (1.0.15.0 32-bit) started
[2016-12-01 17:41:28] [info] [ 9068] Running 'elasticsearch-service-x86' Service...
[2016-12-01 17:41:28] [info] [13124] Starting service...
[2016-12-01 17:41:28] [error] [13124] Missing service ImageFile
[2016-12-01 17:41:28] [error] [13124] The system cannot find the file specified.
[2016-12-01 17:41:28] [error] [13124] ServiceStart returned 1
[2016-12-01 17:41:28] [error] [13124] The system cannot find the file specified.
[2016-12-01 17:41:28] [info] [ 9068] Run service finished.
[2016-12-01 17:41:28] [info] [ 9068] Commons Daemon procrun finished
Can you please specify the OS version?
I’m testing Elasticsearch on my Windows10 PC.
Best regards,
Eric Feron
From: Tanguy Leroux [mailto:[email protected]]
Sent: vendredi 2 décembre 2016 13:54
To: elastic/elasticsearch elasticsearch@noreply.github.com
Cc: Feron Eric Eric_Feron@carrefour.com; Author author@noreply.github.com
Subject: Re: [elastic/elasticsearch] Cannot start Elasticsearch as a Windows service (#21917)
Can you please specify the OS version?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_elastic_elasticsearch_issues_21917-23issuecomment-2D264447885&d=DgMCaQ&c=oYSInPoxeTs4m10ilnGu9Q&r=JMNQtDruu6IrrI-En5T_uWb59nHGif3Zm75ZhJJcx4A&m=VI4rTQaeJp5bggShOVuydS27DM9n1-DWOHgoo_KzPmg&s=lg8AMJS85X-X4DEQCKtJR9GwymC9r407kGRDYjQOOb8&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIVOjqVD-5F7jH2tP0-5F-2DU0-2DW3KGpKR-5FFaIks5rEBTigaJpZM4LBo1p&d=DgMCaQ&c=oYSInPoxeTs4m10ilnGu9Q&r=JMNQtDruu6IrrI-En5T_uWb59nHGif3Zm75ZhJJcx4A&m=VI4rTQaeJp5bggShOVuydS27DM9n1-DWOHgoo_KzPmg&s=qd2G1lFmRCnfQnC4kATOf531VZHSxrf-WY7sUclVzJA&e=.
This e-mail and any attachment are confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. Unauthorized publication, use, dissemination, forwarding, printing or copying of this e-mail and its associated attachments is strictly prohibited.
http://disclaimer.carrefour.com/
Let's respect the environment together. Only print this message if necessary.
Did you set the thread stack size? I ran into something similar a couple weeks ago and found a couple relevant threads on needing to set -Xss1m in the java options (on Windows).
https://github.com/elastic/elasticsearch/issues/20899
https://github.com/elastic/elasticsearch/issues/18317
@AMarthaller We fail the service installation (with a message) if the thread stack size is not set.
Yes, I set the –Xss1m in jvm.options.
Best regards,
From: AMarthaller [mailto:[email protected]]
Sent: vendredi 2 décembre 2016 18:01
To: elastic/elasticsearch elasticsearch@noreply.github.com
Cc: Feron Eric Eric_Feron@carrefour.com; Author author@noreply.github.com
Subject: Re: [elastic/elasticsearch] Cannot start Elasticsearch as a Windows service (#21917)
Did you set the thread stack size? I ran into something similar a couple weeks ago and found a couple relevant threads on needing to set -Xss1m in the java options (on Windows).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_elastic_elasticsearch_issues_21917-23issuecomment-2D264504692&d=DgMFaQ&c=oYSInPoxeTs4m10ilnGu9Q&r=JMNQtDruu6IrrI-En5T_uWb59nHGif3Zm75ZhJJcx4A&m=cucdoPrtSnzEYERipcPReW-19bnus7SARAf9mxclNzk&s=7lEpgpEtEDy3DbBwzPIi9hjYXApTnLdifVrh5FncU3s&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIVOjhltlocfPkZNahFnJMZleWEvEn0Xks5rEE7PgaJpZM4LBo1p&d=DgMFaQ&c=oYSInPoxeTs4m10ilnGu9Q&r=JMNQtDruu6IrrI-En5T_uWb59nHGif3Zm75ZhJJcx4A&m=cucdoPrtSnzEYERipcPReW-19bnus7SARAf9mxclNzk&s=pby-gHmr83IZcO-MkHN7IIKn2ByXbWltHB-NpaDmPXY&e=.
This e-mail and any attachment are confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system. Unauthorized publication, use, dissemination, forwarding, printing or copying of this e-mail and its associated attachments is strictly prohibited.
http://disclaimer.carrefour.com/
Let's respect the environment together. Only print this message if necessary.
Try adding JAVA_HOME="C:\Program Files (x86)\Java\jre8" as a SYSTEM variable.
It was already added.
Best regards,
+1 Same other here on Windows 10
The Elasticsearch 5.0.2 (elasticsearch-service-x64) service terminated with the following service-specific error:
Incorrect function.
thank you
It was already added for me to
Big thanks
I had the exact same thing happen, I had to look at the elasticsearch-stderr log which had a problem loading the node.name in my case, I didn't have a space before the value, so it didn't like that. After I added the space, everything worked as expected.
For me, it got fixed after adding JAVA_HOME as a system variable.
I think this is fixed in recent versions of Elasticsearch. Please upgrade and if the issue persists, we can reopen this issue.
Ensure you have the latest java RTL installed
@jasontedor
I think this is fixed in recent versions of Elasticsearch.
Which version of Elasticsearch was it fixed in? Thanks!
6.4.1 works well. Check your log files - under the logs directory. In my case even though I had the JAVA_HOME defined , it said it wasn't able to find JRE. Turned out it was in the User variables , moved it to System Environment variables and it works fine.
Thanks!!
It was the same in Elasticsearch 7.0 (alpha 1)
I moved after describing JAVA_HOME in the system environment variable
Also, in the log, "Failed creating Java% JAVA_HOME% \ jre \ bin \ server \ jvm.dll" was written
I have the same problem with version 6.6.1-oss installed from .zip on Windows Server 2016 Datacenter 10.0.14393 / 56GB RAM
JAVA_HOME
is set as System Variable
elasticsearch-service.bat install
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk-11.0.2"
-XX:+UseConcMarkSweepGC;-XX:CMSInitiatingOccupancyFraction=75;-XX:+UseCMSInitiatingOccupancyOnly;-XX:+AlwaysPreTouch;-server;-Xss1m;-Djava.awt.headless=true;-Dfile.encoding=UTF-8;-Djna.nosys=true;-Djdk.io.permissionsUseCanonicalPath=true;-Dio.netty.noUnsafe=true;-Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-Dlog4j.skipJansi=true;-XX:+HeapDumpOnOutOfMemoryError;-Xmx14336m;-Xms14336m
The service 'elasticsearch-service-x64' has been installed.
Logs after elasticsearch-service.bat start
[2019-02-22 21:10:10] [info] [21880] Commons Daemon procrun (1.1.0.0 64-bit) started
[2019-02-22 21:10:10] [info] [21880] Running 'elasticsearch-service-x64' Service...
[2019-02-22 21:10:10] [info] [19200] Starting service...
[2019-02-22 21:10:10] [error] [13880] CreateJavaVM Failed
[2019-02-22 21:10:10] [error] [13880] The system cannot find the file specified.
[2019-02-22 21:10:10] [error] [19200] Failed to start Java
[2019-02-22 21:10:10] [error] [19200] ServiceStart returned 4
[2019-02-22 21:10:10] [info] [21880] Run service finished.
[2019-02-22 21:10:10] [info] [21880] Commons Daemon procrun finished
Stderr and stdout has no aditional information.
Java options from elasticsearch-service.bat manager
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+AlwaysPreTouch
-server
-Xss1m
-Djava.awt.headless=true
-Dfile.encoding=UTF-8
-Djna.nosys=true
-Djdk.io.permissionsUseCanonicalPath=true
-Dio.netty.noUnsafe=true
-Dio.netty.noKeySetOptimization=true
-Dio.netty.recycler.maxCapacityPerThread=0
-Dlog4j.shutdownHookEnabled=false
-Dlog4j2.disable.jmx=true
-Dlog4j.skipJansi=true
-XX:+HeapDumpOnOutOfMemoryError
-Xmx14336m
-Xms14336m
-Delasticsearch
-Des.path.home=c:\elasticsearch-6.6.1
-Des.path.conf=E:\ElasticConfig
-Des.distribution.flavor=oss
-Des.distribution.type=zip
If i start bin\elasticsearch.bat
from comand line is working.
Before I installed the full version (6.6.1) also from .zip and had no problem.
6.4.1 works well. Check your log files - under the logs directory. In my case even though I had the JAVA_HOME defined , it said it wasn't able to find JRE. Turned out it was in the User variables , moved it to System Environment variables and it works fine.
JAVA_HOME should be a system variable. Thanks
I just encountered it on windows server 2012 when trying to start the service, should I open another issue?
Most helpful comment
For me, it got fixed after adding JAVA_HOME as a system variable.