-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GR-52698] Cannot run SSL debug logs with GraalVM native image #8564
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
Comments
Created internal ticket: GR-52698 |
Hello @TharmiganK, please try to replace |
@fernando-valdez Getting a similar error: (This is with GraalVM CE 17.0.9+9.1) $ native-image -jar target/bin/https_client.jar --no-fallback -H:Path=target/bin --initialize-at-build-time=sun.security.ssl.SSLLogger -H:+ReportExceptionStackTraces
========================================================================================================================
GraalVM Native Image: Generating 'https_client' (executable)...
========================================================================================================================
[1/8] Initializing...
(0.0s @ 0.19GB)
Error: Incompatible change of initialization policy for sun.security.ssl.SSLLogger: trying to change BUILD_TIME from command line with 'sun.security.ssl.SSLLogger' to RERUN for reading properties at run time
com.oracle.svm.core.util.UserError$UserException: Incompatible change of initialization policy for sun.security.ssl.SSLLogger: trying to change BUILD_TIME from command line with 'sun.security.ssl.SSLLogger' to RERUN for reading properties at run time
at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:103)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:117)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:117)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:117)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:117)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insert(ClassInitializationConfiguration.java:64)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.rerunInitialization(ProvenSafeClassInitializationSupport.java:162)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SecurityServicesFeature.lambda$duringSetup$1(SecurityServicesFeature.java:309)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.SecurityServicesFeature.duringSetup(SecurityServicesFeature.java:309)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$setupNativeImage$16(NativeImageGenerator.java:938)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:89)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:938)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:579)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
------------------------------------------------------------------------------------------------------------------------
0.5s (9.2% of total time) in 17 GCs | Peak RSS: 0.68GB | CPU load: 2.84
========================================================================================================================
Finished generating 'https_client' in 4.7s. |
@fernando-valdez any update on this issue? |
Is there any issue with features leveraging jvm arguments in general? I am facing Kerberos related issue which depends on a jvm argument. #8674 |
@fernando-valdez Any update on this issue? This is required to debug production issues with GraalVM native images? |
When I tested using the following code, it seemed that import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
public class SSLDebugSample {
public static void main(String[] args) {
try {
URL url = URI.create("https://www.example.com").toURL();
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
try (BufferedReader in =
new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
while (in.readLine() != null);
}
System.out.println("Request completed successfully.");
} catch (Exception e) {
e.printStackTrace();
}
}
} Command:
With no flag:
Version:
I hope this information is helpful! |
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue
I am trying to enable SSL debug logs by providing the
-Djavax.net.debug=ssl
flag with the native executable. But I am not getting any SSL logsSteps to reproduce the issue
Download the zip file from this link.
Unzip the package
Build the native executable for the
https_client.jar
in thetarget/bin
directory.Run the
https_service.jar
with SSL debug logs:$ java -Djavax.net.debug=ssl -jar ./target/bin/https_server.jar
Run the client native executable with SSL debug logs:
$ ./target/bin/https_client -Djavax.net.debug=ssl
Describe GraalVM and your environment:
More details
Related slack thread: https://graalvm.slack.com/archives/CN9KSFB40/p1710326823711189?thread_ts=1710171443.562749&cid=CN9KSFB40
Tried to initialise
sun.security.ssl.SSLLogger
at runtime but it did not work the following error is returned:$ native-image -jar target/bin/https_client.jar --no-fallback --initialize-at-run-time=sun.security.ssl.SSLLogger -H:+ReportExceptionStackTraces -H:Path=target/bin
The text was updated successfully, but these errors were encountered: