0

I have ES 7.10.2 installed as a service in W10. Looking at some very cursory notes I seem to have made, I installed this by going

...\bin>elasticsearch-service.bat install

So I just downloaded the .zip for 7.16.3 (please don't ask why I don't yet want to move to 8!).

  • I stopped the existing 7.10.2 service, which is called "elasticsearch-service-x64"

  • In the unzipped 7.16.3 directory I went

    ...\bin> elasticsearch-service.bat install

  • I get a screen saying "do you want to do this as admin" --> Yes

  • I get the following failure:

D:\apps\ElasticSearch\elasticsearch-7.16.3\bin>elasticsearch-service.bat install Installing service : "elasticsearch-service-x64" Using ES_JAVA_HOME (64-bit): "D:\apps\ElasticSearch\elasticsearch-7.16.3\jdk" -Des.networkaddress.cache.ttl=60;-Des.networkaddress.cache.negative.ttl=10;-XX:+AlwaysPreTouch;-Xss1m;-Djava.awt.headless=true;-Dfile.encoding=UTF-8;-Djna.nosys=true;-XX:-OmitStackTraceInFastThrow;-XX:+ShowCodeDetailsInExceptionMessages;-Dio.netty.noUnsafe=true;-Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-Dio.netty.allocator.numDirectArenas=0;-Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-Dlog4j2.formatMsgNoLookups=true;-Djava.locale.providers=SPI,COMPAT;--add-opens=java.base/java.io=ALL-UNNAMED;-Xms1g;-Xmx1g;-XX:+UseG1GC;-XX:G1ReservePercent=25;-XX:InitiatingHeapOccupancyPercent=30;-Djava.io.tmpdir=C:\Users\Chris\AppData\Local\Temp\elasticsearch;-XX:+HeapDumpOnOutOfMemoryError;-XX:HeapDumpPath=data;-XX:ErrorFile=logs/hs_err_pid%p.log;-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m;-XX:MaxDirectMemorySize=536870912;-XX:G1HeapRegionSize=4m
Failed installing 'elasticsearch-service-x64' service

yup, NOTHING ELSE. Spectacularly informative. To be fair, there may be some log output somewhere... But I have obviously have no idea where I might find that.

In a way I am not surprised that this failed to be installed, as there is already an existing service called "elasticsearch-service-x64", and just because it is stopped this wouldn't stop installing a new one with the same name being a problem. Can we install ES with a custom name??? (such as "elasticsearch-service-7.16.3"? Oh how helpful that might be).

But I am EXTREMELY nervous about, for example, uninstalling/deleting the present ES service 7.10.2, which does at least work. I am far from convinced that re-installing it would be trivial.

This time I intend to make many many more notes.

Has anyone had this experience? What do I do?

mike rodent
  • 14,126
  • 11
  • 103
  • 157

1 Answers1

1

Anyone else ever wanting to upgrade this:

All the following was done in W10 as Admin:

I wondered if it was possible to change the path to the executable. Found this. I stopped the ES service. Then I did this:

sc config elasticsearch-service-x64 binPath= "D:\...\elasticsearch-7.16.3\bin\bin\elasticsearch-service-x64.exe"

This said "success". The W10 "Services" dialog showed that the "path to executable" had indeed been changed.

But the service wouldn't start.

Then I tried to switch back to 7.10.2 using the above method. Again it wouldn't start. At least this meant I had no choice but to uninstall and reinstall, which is what I did:

sc delete elasticsearch-service-x64

In the 7.16.3 bin directory:

...>elasticsearch-service.bat install

... success! 7.16.3 installed as service elasticsearch-service-x64. Also starts.

mike rodent
  • 14,126
  • 11
  • 103
  • 157
  • This was very usefull after the recent update of Windows 11. Just delete elasticsearch-service-x64 and reinstall. – chemark Oct 05 '22 at 13:53