-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Support using DIGEST-MD5 as the SASL mechanism for ElasticJob CoordinatorRegistryCenter
under GraalVM Native Image
#2428
Conversation
e101206
to
0fbe704
Compare
CoordinatorRegistryCenter
under GraalVM Native Image
0fbe704
to
b6b4e82
Compare
a9dd4ad
to
dae6ed8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I used the buildArg of
-H:+UnlockExperimentalVMOptions -g -O0 -H:+SourceLevelDebug -H:-DeleteLocalSymbols
to attach debug information to the GraalVM Native Image generated by nativeTest, but it seems to be useless. First of all, affected by https://youtrack.jetbrains.com/issue/IDEA-330170 , IntelliJ IDEA's prompts are not intuitive. Affected by Copy APT generated sources into the debugger cache graalvm/native-build-tools#145 ,target/source
does not carry the local Java code.
sudo apt-get install build-essential zlib1g-dev -y
sdk install java 22.0.2-graalce
cd ./shardingsphere-elasticjob/
sdk use java 22.0.2-graalce
./mvnw -PnativeTestInElasticJob -T1C -e clean test
cp -rf ./test/native/src/test/java/* ./test/native/target/sources/
./test/native/target/native-tests --xml-output-dir ./test/native/target/native-test-reports -Djunit.platform.listeners.uid.tracking.output.dir=./test/native/target/test-ids
- Interestingly, I can run
native-tests
locally in IntelliJ IDEA, but if I expect to debugnative-tests
locally in IntelliJ IDEA, IntelliJ IDEA protests. There is no straightforward description in https://www.jetbrains.com/help/idea/debug-graalvm-native.html, it's all dry text, as if assuming that what you see is what you get for the UI. - https://github.com/nativejdb/nativejdb looks like it's no longer updated and looks like it's about to enter an epic debugging hell. Of course nativejdb does not support jdk22 at all.
dae6ed8
to
cc0eafc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- gdb local debugging is not available for IntelliJ IDEA, but gdb remote debugging is available for IntelliJ IDEA. IntelliJ IDEA is connected to the Native Image, but it seems that it is not possible to see the internals of variables. All we see is cluttered C++ pointers.
cd ./shardingsphere-elasticjob/
sdk use java 22.0.2-graalce
./mvnw -PnativeTestInElasticJob -T1C -e clean test
gdbserver :1234 ./test/native/target/native-tests --xml-output-dir ./test/native/target/native-test-reports -Djunit.platform.listeners.uid.tracking.output.dir=./test/native/target/test-ids
cc0eafc
to
c7025ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Further investigation at [GR-44320] Unable to make Kerberos Authenticated http calls due to GSSManager Oid issue oracle/graal#5950 .
…natorRegistryCenter` under GraalVM Native Image
c7025ed
to
bc9d023
Compare
Fixes #2457.
Changes proposed in this pull request:
CoordinatorRegistryCenter
under GraalVM Native Image.org.apache.curator.test.TestingServer
, a lot of system properties are set in the background, refer to https://github.com/apache/zookeeper/blob/release-3.9.2/zookeeper-server/src/test/java/org/apache/zookeeper/test/SaslDigestAuthOverSSLTest.java .Therefore, in order to test Zookeeper Server with SASL mechanism enabled under ElasticJob
CoordinatorRegistryCenter
, ElasticJob should never start Zookeeper Server throughorg.apache.curator.test.TestingServer
. Running Zookeeper Server and Curator Client in the same JVM process will pollute system properties. For more information on this unit test, refer to https://zookeeper.apache.org/doc/r3.9.2/zookeeperAdmin.html andhttps://cwiki.apache.org/confluence/display/ZOOKEEPER/ZooKeeper+and+SASL .
saslToken
of Zookeeper Quorum member is empty.