Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Ignite 2.15.0 startup failure using OpenJDK 17 version #10747

Closed
Indupa opened this issue May 29, 2023 · 10 comments
Closed

Apache Ignite 2.15.0 startup failure using OpenJDK 17 version #10747

Indupa opened this issue May 29, 2023 · 10 comments

Comments

@Indupa
Copy link

Indupa commented May 29, 2023

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...?

@ivandasch
Copy link
Contributor

ivandasch commented May 29, 2023

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 \

@Indupa
Copy link
Author

Indupa commented May 29, 2023

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

Note : I am running Ignite on Windows Server

@ivandasch
Copy link
Contributor

ivandasch commented May 29, 2023

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

@sergeykad
Copy link

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

@Indupa
Copy link
Author

Indupa commented Jun 26, 2023

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
Copy link
Author

Indupa commented Jun 29, 2023

Hii,

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

@Harinath2306
Copy link

Harinath2306 commented Jul 11, 2023

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

@sergeykad
Copy link

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

@Indupa
Copy link
Author

Indupa commented Jul 14, 2023

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 Indupa changed the title Does Apache Ignite 2.15.0 Runs using OpenJDK 17 version ......? Apache Ignite 2.15.0 startup failure using OpenJDK 17 version Jul 14, 2023
@NSAmelchev
Copy link
Contributor

@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

@sk0x50 sk0x50 closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants