Some proplem about Elasticsearch service install on windows

When I tried to install the elasticsearch as a service, I meet this probloem,and I can't solve it,could anyone know how to do with this.PS C:\WINDOWS\system32> f:PS F:> cd .\Elasticsearch`
PS F:\Elasticsearch> cd bin
PS F:\Elasticsearch\bin> .\elasticsearch-service.bat install
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_181"
-Xms1g;-Xmx1g;-XX:+UseConcMarkSweepGC;-XX:CMSInitiatingOccupancyFraction=75;-``XX:+UseCMSInitiatingOccupancyOnly;-XX:+AlwaysPreTouch;-Xss1m;-Djava.awt.headless=true;-``Dfile.encoding=UTF-8;-Djna.nosys=true;-XX:-OmitStackTraceInFastThrow;-Dio.netty.noUnsafe=true;-``Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-``Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-``Djava.io.tmpdir=C:\Users\dell\AppData\Local\Temp\elasticsearch;-``XX:+HeapDumpOnOutOfMemoryError;-XX:HeapDumpPath=data;-XX:ErrorFile=logs/hs_err_pid%p.log;-``XX:+PrintGCDetails;-XX:+PrintGCDateStamps;-XX:+PrintTenuringDistribution;-``XX:+PrintGCApplicationStoppedTime;-Xloggc:logs/gc.log;-XX:+UseGCLogFileRotation;-``XX:NumberOfGCLogFiles=32;-XX:GCLogFileSize=64m
Failed installing 'elasticsearch-service-x64' service
and I checked the log:
[2018-08-20 20:39:53] [info] [11900] Service elasticsearch-service-x64 name Elasticsearch 6.3.2 (elasticsearch-service-x64)
[2018-08-20 20:40:36] [error] [11900] access denied。
[2018-08-20 20:40:36] [error] [11900] Failed installing 'elasticsearch-service-x64' service
[2018-08-20 20:40:36] [error] [11900] access denied。
[2018-08-20 20:40:36] [error] [11900] Commons Daemon procrun failed with exit value: 8 (Failed to install service)
[2018-08-20 20:40:36] [error] [11900] access denied。

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with </> icon, then check the preview window.


It looks like the command prompt from which you're trying to install the service does not have sufficient privileges to do so, based on the access denied error. Open a command prompt with "run as administrator" and try again.

Thanks for your reply.I have deleted the images and post the text with the </> icon.I already use the "run as administrator" way to open the command prompt,but the result seems no difference.Besides,I can run the "elasticsearch.bat" file correctly,But when I want to install it as a service,there are some problems.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.