corretto-8
corretto-8 copied to clipboard
Latest 3.x Cassandra (3.11.10) fails to start after updating corretto jdk from 8.252 to 8.292
Describe the bug
Cassandra fails to start with the following exception
[2021-05-22 03:19:04,790] [Apache Cassandra Error] java.lang.UnsatisfiedLinkError: C:\Users\alexey.barsov\AppData\Local\Temp\jna--1630081341\jna2627169091367567840.dll: Can't find dependent libraries
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at java.lang.Runtime.load0(Runtime.java:810)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at java.lang.System.load(System.java:1088)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at com.sun.jna.Native.<clinit>(Native.java:140)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at org.apache.cassandra.utils.WindowsTimer.<clinit>(WindowsTimer.java:35)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:630)
[2021-05-22 03:19:04,790] [Apache Cassandra Error] at com.jetbrains.cassandra.service.CassandraServiceMain.start(CassandraServiceMain.java:92)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:99)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:97)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2021-05-22 03:19:04,791] [Apache Cassandra Error] at java.lang.Thread.run(Thread.java:748)
To Reproduce
Run Cassandra 3.11.0 on corretto jdk 8.292
Expected behavior
Cassandra start successfully (as it was with corretto jdk 8.252)
Platform information
OS: Windows 10
Version: OpenJDK 64-Bit Server VM Corretto-8.292.10.1 (build 25.292-b10, mixed mode)
I have just tried Cassandra 3.11.10 with zulu-jdk 1.8.0_292 and it works fine
OpenJDK 64-Bit Server VM (Zulu 8.54.0.21-CA-win64) (build 25.292-b10, mixed mode)
Is this your JNI library? Do you know what dependent libraries are loading?
[2021-05-22 03:19:04,790] [Apache Cassandra Error] java.lang.UnsatisfiedLinkError: C:\Users\alexey.barsov\AppData\Local\Temp\jna--1630081341\jna2627169091367567840.dll: Can't find dependent libraries
What's your Windows version? We recently updated MSVCR from 1.0 to 1.2. https://github.com/corretto/corretto-8/commit/c34e5b8c94348edab3c0ada26509bc7baf252daa
What's your Windows version?
Windows 10 Pro (Version 10.0.19042 Build 19042)
Is this your JNI library?
Cassandra bundles pretty old jna.jar of version 4.2.2
Do you know what dependent libraries are loading?
looks like it tries to register winmm.dll
on startup and fails.
Link to casandra source code mentioned in stack trace: https://github.com/apache/cassandra/blob/bf96367f4d55692017e144980cf17963e31df127/src/java/org/apache/cassandra/utils/WindowsTimer.java#L35
It started working after I had updated jna version to the latest on cassanra classpath (from 4.2.2 to 5.8.0). Now I don't understand where is the bug/incompatibility:
- in cassandra?
- in jdk?
- on in both?
I have to say that I don't know much about Windows. I got trouble to start the stock apache-cassandra-3.11.10. It's weird that I don't use 'JNA' to load the native library.
It seems that you launch cassandra from Intellij? Could you elaborate how do you start it?
It seems that you launch cassandra from Intellij? Could you elaborate how do you start it?
- download Upsource,
- unpack somewhere
- remove bundled jdk (corretto 8.252) from
/path/to/upsource/directory/internal/java
(Upsource would use system java to start in that case instead of bundled one) - define env variable JAVA_HOME to the location of corretto 8.292
- start Upsource with the following command
/path/to/upsource/directory/bin/upsource.sh start -J-Ddisable.configuration.wizard.on.clean.install=true
After start failed you would find exception in /path/to/upsource/directory/logs/cassandra/cassandra-stderr.log
reported this to Cassandra tracker as well: https://issues.apache.org/jira/browse/CASSANDRA-16702