ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Apache Ignite 2.15.0 startup failure using OpenJDK 17 version

Open Indupa opened this issue 2 years ago • 10 comments

Hi ,

Iam currently using Apache Ignite of version 2.15.0 . But Iam unable to Run Ignite using JDK version of 17 .

What version of JDK to be installed to run Apche Ignite 2.15.0 .....?

Could you please help me on this...?

Indupa avatar May 29 '23 06:05 Indupa

Hi, yes, ignite supports running on jvm 15 and higher

You should add this to jvm options:

   --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \
          --add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
          --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED \
          --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED \
          --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED \
          --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED \
          --add-opens=java.base/java.io=ALL-UNNAMED \
          --add-opens=java.base/java.nio=ALL-UNNAMED \
          --add-opens=java.base/java.util=ALL-UNNAMED \
          --add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
          --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED \
          --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
          --add-opens=java.base/java.lang=ALL-UNNAMED \
          --add-opens=java.base/java.lang.invoke=ALL-UNNAMED \
          --add-opens=java.base/java.math=ALL-UNNAMED \
          --add-opens=java.sql/java.sql=ALL-UNNAMED \

ivandasch avatar May 29 '23 06:05 ivandasch

Jvm options in the sense, where i have to add these configuration or in which file ...?

Note : I am running Ignite on Windows Server

Indupa avatar May 29 '23 09:05 Indupa

If ignite is started using "ignite.sh", it will work as is, just tested on openjdk 17.0.6.

If ignite is embedded, it is required to add these options to the application's start script.

Here is an example how to set jvm options: https://opensource.com/article/22/4/jvm-parameters-java-developers

ivandasch avatar May 29 '23 10:05 ivandasch

Are there plans to create an official Docker image based on Java 17?

sergeykad avatar Jun 14 '23 13:06 sergeykad

Hi , In our project , ignite is started using "Topshelf" command to run as windows service by passing JAVA_HOME as one of the Argument.

when i tried to run Apche Ignite 2.15.0 with OpenJDK 17, Its not working. Can you please provide information on this.....?

Note : I am running Ignite on Windows Server

Getting the following error when i tried to start Ignite 2.15 with jdk 17

2023-06-26 14:56:49.514 [ERR] Exception while starting ignite service. Apache.Ignite.Core.Common.IgniteException: Java exception occurred [class=java.lang.ExceptionInInitializerError, message=] ---> Apache.Ignite.Core.Common.JavaException: java.lang.ExceptionInInitializerError at org.apache.ignite.internal.processors.platform.memory.PlatformAbstractMemory.(PlatformAbstractMemory.java:27) at org.apache.ignite.internal.processors.platform.PlatformAbstractBootstrap.init(PlatformAbstractBootstrap.java:54) at org.apache.ignite.internal.processors.platform.PlatformIgnition.start(PlatformIgnition.java:65) Caused by: java.lang.RuntimeException: java.nio.DirectByteBuffer.address field is unavailable. at org.apache.ignite.internal.util.GridUnsafe$2.run(GridUnsafe.java:1570) at org.apache.ignite.internal.util.GridUnsafe$2.run(GridUnsafe.java:1557) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at org.apache.ignite.internal.util.GridUnsafe.bufferAddressOffset(GridUnsafe.java:1557) at org.apache.ignite.internal.util.GridUnsafe.(GridUnsafe.java:109) ... 3 more Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @4b85612c at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at org.apache.ignite.internal.util.GridUnsafe$2.run(GridUnsafe.java:1562) ... 7 more

at Apache.Ignite.Core.Impl.Unmanaged.Jni.Env.ExceptionCheck() at Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils.IgnitionStart(Env env, String cfgPath, String gridName, Boolean clientMode, Boolean userLogger, Int64 igniteId, Boolean redirectConsole) at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg) --- End of inner exception stack trace --- at Apache.Ignite.Core.Ignition.Start(IgniteConfiguration cfg)

Indupa avatar Jun 26 '23 07:06 Indupa

Hii,

Can you please help me on resolving this issue....?

Indupa avatar Jun 29 '23 03:06 Indupa

Hi,

I'm facing similar issue. All the jvm options that are listed are present in jvmdefaults.sh, but still facing the same issue

Is there any workaround for this issue? Can you please help by updating on this.

Thanks, Harinath

Harinath2306 avatar Jul 11 '23 04:07 Harinath2306

Works for me with these:

--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
--add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED
--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED

sergeykad avatar Jul 12 '23 11:07 sergeykad

above issue is now not exist in my environment ,but getting below error even though i have 16GB of free memory in my environment and other environments as well.

Service cannot be started. Apache.Ignite.Core.Common.IgniteException: Java exception occurred [class=java.lang.OutOfMemoryError, message=Java heap space] ---> Apache.Ignite.Core.Common.JavaException: java.lang.OutOfMemoryError: Java heap space at org.apache.ignite.internal.processors.platform.utils.PlatformConfigurationUtils.readIgniteConfiguration(PlatformConfigurationUtils.java:773) at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.processPrepareResult(PlatformDotNetConfigurationClosure.java:195) at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.prepare(PlatformDotNetConfigurationClosure.java:182) at org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetConfigurationClosure.apply0(PlatformDotNetConfigurationClosure.java:110) at org.apache.ignite.internal.processors.platform.PlatformAbstractConfigurationClosure.apply(PlatformAbstractConfigurationClosure.java:50) at org.apache.ignite.internal.processors.platform.PlatformAbst...

Indupa avatar Jul 14 '23 06:07 Indupa

@Indupa The Apache Ignite 2.16.0 released. Please check if the issue is still relevant?

https://ignite.apache.org/blog/apache-ignite-2-16-0.html

NSAmelchev avatar Dec 26 '23 19:12 NSAmelchev

So i faced the same problem when i start Ignite on windows 10, this solved in my case:

  1. switch to ignite 2.16
  2. added VM option: --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED

Litvinovis avatar Jun 11 '24 18:06 Litvinovis