在 W10 中升级/重新安装 Elasticsearch 作为服务
我在 W10 中将 ES 7.10.2 作为服务安装。 看看我似乎做了一些非常粗略的笔记,我通过以下方式安装了它
...\bin>elasticsearch-service.bat install
,所以我刚刚下载了 7.16.3 的 .zip(请不要问为什么我还不想升级到 8!)。
我停止了现有的 7.10.2 服务,该服务称为“elasticsearch-service-x64”
在解压的 7.16.3 目录中我去了
<代码>...\bin> elasticsearch-service.bat安装
我看到一个屏幕,上面写着“你想以管理员身份执行此操作吗” -->是的
我遇到以下失败:
D:\apps\ElasticSearch\elasticsearch-7.16.3\bin>elasticsearch-service.bat install 安装服务:“elasticsearch-service-x64” 使用 ES_JAVA_HOME(64 位):“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.al locator.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:G1ReserveP ercent=25;-XX:InitiatingHeapOccupancyPercent=30;-Djava.io.tmpdir=C:\Users\Chris\AppData\Local\Temp\elasticsearch;-XX:+H eapDumpOnOutOfMemoryError;-XX:HeapDumpPath=数据;-XX:ErrorFile=logs/hs_err_pid%p.log;-Xlog:gc*,gc+age=trace,safepoint:fi le=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m;-XX:MaxDirectMemorySize=536870912;-XX:G1HeapRegionSize=4m
安装“elasticsearch-service-x64”服务失败
是的,仅此而已。内容丰富,内容丰富。公平地说,某处可能有一些日志输出......但我显然不知道在哪里可以找到它。
在某种程度上,我对安装失败并不感到惊讶,因为已经有一个名为“elasticsearch-service-x64”的现有服务,并且仅仅因为它被停止,这不会停止安装同名的新服务一个问题。我们可以用自定义名称安装 ES 吗??? (例如“elasticsearch-service-7.16.3”?哦,这可能会有帮助)。
但我非常担心,例如,卸载/删除现有的 ES 服务 7.10.2,它至少可以工作。我远不相信重新安装它会是微不足道的。
这次我打算做更多很多的笔记。
有人有过这样的经历吗?我该怎么办?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
其他任何想要升级此版本的人:
以下所有操作都是在 W10 中以管理员身份完成的:
我想知道是否可以更改可执行文件的路径。找到这个。
我停止了ES服务。然后我这样做了:
这表示“成功”。 W10“服务”对话框显示“可执行文件的路径”确实已更改。
但该服务无法启动。
然后我尝试使用上述方法返回到7.10.2。又无法启动。至少这意味着我别无选择,只能卸载并重新安装,这就是我所做的:
在7.16.3 bin目录中:
...成功! 7.16.3 安装为服务 elasticsearch-service-x64。也开始。
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:
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:
In the 7.16.3 bin directory:
... success! 7.16.3 installed as service elasticsearch-service-x64. Also starts.