ROR 1.58.0 for ES8.14.3 Windows setup

Hello.
I am trying to install ROR 1.58.0 on a clean ES8.14.3 setup on a Windows 10 pro operating system.
Pluging install (with elasticsearch-plugin command) is ok.
When trying to apply the patch there is an error (UnsupportedOperationException):
C:\Temp\es8>“jdk/bin/java” -jar plugins/readonlyrest/ror-tools.jar patch --es-path “c:\temp\es8”
Checking if Elasticsearch is patched …
Creating backup …
Patching …
java.lang.UnsupportedOperationException
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:196)
at java.base/java.nio.file.Files.readAttributes(Files.java:1858)
at java.base/java.nio.file.Files.getPosixFilePermissions(Files.java:2132)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.modifiers.BytecodeJarModifier.modifyFileInJar(BytecodeJarModifier.scala:32)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.modifiers.bytecodeJars.OpenModule$.apply(OpenModule.scala:30)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.FileModifiersBasedPatch.patch$$anonfun$1(FilePatch.scala:41)
at tech.beshu.ror.tools.scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at tech.beshu.ror.tools.scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at tech.beshu.ror.tools.scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
at tech.beshu.ror.tools.scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
at tech.beshu.ror.tools.scala.collection.AbstractIterable.foreach(Iterable.scala:933)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.FileModifiersBasedPatch.patch(FilePatch.scala:41)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.MultiFilePatch.patch$$anonfun$2(FilePatch.scala:57)
at tech.beshu.ror.tools.scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at tech.beshu.ror.tools.scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at tech.beshu.ror.tools.scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
at tech.beshu.ror.tools.scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574)
at tech.beshu.ror.tools.scala.collection.AbstractIterable.foreach(Iterable.scala:933)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.MultiFilePatch.patch(FilePatch.scala:57)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.base.TransportNetty4AwareEsPatch.execute(TransportNetty4AwareEsPatch.scala:75)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.execute$$anonfun$1(EsPatchLoggingDecorator.scala:49)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.$anonfun$adapted$2(EsPatchLoggingDecorator.scala:49)
at tech.beshu.ror.tools.scala.util.Try$.apply(Try.scala:210)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.execute(EsPatchLoggingDecorator.scala:49)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.actions$PatchAction.execute(actions.scala:32)
at tech.beshu.ror.tools.RorToolsApp$.main$$anonfun$1$$anonfun$1(RorToolsApp.scala:39)
at tech.beshu.ror.tools.RorToolsApp$.main$$anonfun$1$$anonfun$adapted$1(RorToolsApp.scala:47)
at tech.beshu.ror.tools.scala.util.Try$.apply(Try.scala:210)
at tech.beshu.ror.tools.RorToolsApp$.main$$anonfun$1(RorToolsApp.scala:47)
at tech.beshu.ror.tools.scala.Option.foreach(Option.scala:437)
at tech.beshu.ror.tools.RorToolsApp$.main(RorToolsApp.scala:54)
at tech.beshu.ror.tools.RorToolsApp.main(RorToolsApp.scala)
UNEXPECTED ERROR: ()

Then, if I try to start ES, ES is failing
[2024-07-17T17:27:42,009][ERROR][o.e.b.Elasticsearch ] [DARLPF0Y2AKV] fatal exception while booting Elasticsearch
org.joor.ReflectException: java.lang.reflect.InaccessibleObjectException: Unable to make field private final org.elasticsearch.client.internal.node.NodeClient org.elasticsearch.rest.RestController.client accessible: module org.elasticsearch.server does not “opens org.elasticsearch.rest” to unnamed module @196d2b30
at org.joor.Reflect.field(Reflect.java:450) ~[?:?]
at org.joor.Reflect.get(Reflect.java:429) ~[?:?]
at tech.beshu.ror.es.utils.RestControllerOps.decorateRestHandlersWith$$anonfun$1(RestControllerOps.scala:36) ~[?:?]
at tech.beshu.ror.utils.AccessControllerHelper$$anon$1.run(AccessControllerHelper.scala:24) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:319) ~[?:?]
at tech.beshu.ror.utils.AccessControllerHelper$.doPrivileged(AccessControllerHelper.scala:25) ~[?:?]
at tech.beshu.ror.es.utils.RestControllerOps.decorateRestHandlersWith(RestControllerOps.scala:42) ~[?:?]
at tech.beshu.ror.es.ReadonlyRestPlugin.getRestHandlers(ReadonlyRestPlugin.scala:225) ~[?:?]
at org.elasticsearch.action.ActionModule.initRestHandlers(ActionModule.java:1012) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.node.NodeConstruction.postInjection(NodeConstruction.java:1303) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.node.NodeConstruction.construct(NodeConstruction.java:1123) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:266) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.node.Node.(Node.java:192) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:240) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:240) ~[elasticsearch-8.14.3.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.14.3.jar:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final org.elasticsearch.client.internal.node.NodeClient org.elasticsearch.rest.RestController.client accessible: module org.elasticsearch.server does not “opens org.elasticsearch.rest” to unnamed module @196d2b30
at java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:388) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:364) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:312) ~[?:?]
at java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) ~[?:?]
at java.lang.reflect.Field.setAccessible(Field.java:177) ~[?:?]
at org.joor.Reflect.accessible(Reflect.java:279) ~[?:?]
at org.joor.Reflect.field0(Reflect.java:466) ~[?:?]
at org.joor.Reflect.field(Reflect.java:446) ~[?:?]
… 15 more

Was this version tested on a windows setup and do you have any idea on how to fix the problem ?
Many thanks in advance !

Thanks for reporting this problem. We will check it and let you know here

indeed, there was a problem.
Please try the pre-build with our fix: ROR 1.59.0-pre2 for ES 8.14.3

Thanks, I will test that and and let you know here.
Regards,
Stephen

Hello.
Tested multiple times with clean install.

  • Plugin install is ok:
    C:\Temp\es8>“bin/elasticsearch-plugin” install file:///C:\Temp\Elasticsearch\readonlyrest-1.59.0-pre2_es8.14.3.zip

  • Patch is rising the same issue:
    C:\Temp\es8>“jdk/bin/java” -jar plugins/readonlyrest/ror-tools.jar patch --es-path c:\temp\es8

  • Starting elasticsearch is rising also the same issue

I don’t copy the logs again as they are exactly the sames.

Can you check again please ? Or maybe I am making a mistake ?

Regards,
Stephen

ok, thanks for testing.
It seems that I have to check it on the Windows 10 pro.
Will get back to you when it’s done.

ok, this one should work:
ROR 1.59.0-pre2 for ES 8.14.3

Hello and thanks for your update.
This time, install, patch and Elasticsearch are correct, thanks for your update.
Done without any issue or error message.

Can you please add a comment here when you do the release with this bug fix ?

Thanks again for your time !
Regards,
Stephen

1 Like

Great! thanks for the confirmation
The fix will be a part of the ROR 1.59.0 release. We are going to release it soon. This weekend is a realistic date, but I cannot promise.

Many thanks for your help !

1 Like

ROR 1.59.0 with the fix is released