Hi, we get the following error when unpatching the Elasticsearch plugin (via Ansible) (from 8.15.1 / 1.59.0):
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by tech.beshu.ror.tools.scala.runtime.LazyVals$ (file:/usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar)
WARNING: Please consider reporting this to the maintainers of class tech.beshu.ror.tools.scala.runtime.LazyVals$
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/readonlyrest/patch_backup/elasticsearch-8.18.1.jar
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystem.copy(UnixFileSystem.java:954)
at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:280)
at java.base/java.nio.file.Files.copy(Files.java:1189)
at tech.beshu.ror.tools.os.copy$.copyOne$1(FileOps.scala:200)
at tech.beshu.ror.tools.os.copy$.apply(FileOps.scala:204)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.RorPluginDirectory.restore(RorPluginDirectory.scala:49)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.FileModifiersBasedPatch.restore(FilePatch.scala:46)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.MultiFilePatch.restore$$anonfun$1(FilePatch.scala:61)
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.restore(FilePatch.scala:61)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.base.TransportNetty4AwareEsPatch.restore(TransportNetty4AwareEsPatch.scala:67)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.restore$$anonfun$1(EsPatchLoggingDecorator.scala:39)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.$anonfun$adapted$1(EsPatchLoggingDecorator.scala:39)
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.restore(EsPatchLoggingDecorator.scala:39)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.actions$UnpatchAction.execute(actions.scala:39)
at tech.beshu.ror.tools.RorToolsApp$.main$$anonfun$1$$anonfun$1(RorToolsApp.scala:42)
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)
When we tried to get the message a bit more clear (from the commandline), we get the following:
~# /usr/share/elasticsearch/jdk/bin/java -jar /usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar unpatch
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by tech.beshu.ror.tools.scala.runtime.LazyVals$ (file:/usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar)
WARNING: Please consider reporting this to the maintainers of class tech.beshu.ror.tools.scala.runtime.LazyVals$
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
Checking if Elasticsearch is patched ...
java.lang.IllegalStateException:
ES Corrupted! Something went wrong during patching/unpatching and the current state of ES installation is corrupted.
To recover from this state, please uninstall ReadonlyREST plugin and copy the corrupted files from ES binaries (https://www.elastic.co/downloads/elasticsearch):
- /usr/share/elasticsearch/lib/elasticsearch-8.18.1.jar
- /usr/share/elasticsearch/modules/x-pack-core/x-pack-core-8.18.1.jar
- /usr/share/elasticsearch/modules/x-pack-security/x-pack-security-8.18.1.jar
- /usr/share/elasticsearch/modules/x-pack-ilm/x-pack-ilm-8.18.1.jar
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.base.TransportNetty4AwareEsPatch.isPatched(TransportNetty4AwareEsPatch.scala:50)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.patches.internal.EsPatchLoggingDecorator.isPatched(EsPatchLoggingDecorator.scala:29)
at tech.beshu.ror.tools.tech.beshu.ror.tools.core.actions$UnpatchAction.execute(actions.scala:38)
at tech.beshu.ror.tools.RorToolsApp$.main$$anonfun$1$$anonfun$1(RorToolsApp.scala:42)
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: ()
Did something change or is something broken?
Thanks & regards,
Arjen Buising