I had some issues when I created the Spring Boot project and applied CRaC:
ERROR:
Error (criu/libnetlink.c:54): -1 reported by netlink: Operation not permitted Error (criu/net.c:3744): Unable to create a veth pair: -1
- Steps:
- Run docker build -f ./Dockerfile/base/Dockerfile -t centos-zulu-jdk17-crac .
- Run /usr/bin/env bash ./checkpoint.sh
- Run docker compose up
And
When I run file checkpointOnRefresh.sh
I get an error when running docker-builder
ERROR:
org.springframework.context.ApplicationContextException: Failed to take CRaC checkpoint on refresh
graalvm-1 | at org.springframework.context.support.DefaultLifecycleProcessor$CracDelegate.checkpointRestore(DefaultLifecycleProcessor.java:534) ~[spring-context-6.1.3.jar!/:6.1.3]
graalvm-1 | at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:193) ~[spring-context-6.1.3.jar!/:6.1.3]
graalvm-1 | at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:978) ~[spring-context-6.1.3.jar!/:6.1.3]
graalvm-1 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) ~[spring-context-6.1.3.jar!/:6.1.3]
graalvm-1 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.2.jar!/:3.2.2]
graalvm-1 | at com.example.graalvm.GraalvmApplication.main(GraalvmApplication.java:10) ~[!/:0.0.1-SNAPSHOT]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
graalvm-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
graalvm-1 | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91) ~[graalvm-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
graalvm-1 | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53) ~[graalvm-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
graalvm-1 | at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58) ~[graalvm-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
graalvm-1 | Caused by: org.crac.CheckpointException: null
graalvm-1 | at org.crac.Core$Compat.checkpointRestore(Core.java:144) ~[crac-1.4.0.jar!/:na]
graalvm-1 | at org.crac.Core.checkpointRestore(Core.java:237) ~[crac-1.4.0.jar!/:na]
graalvm-1 | at org.springframework.context.support.DefaultLifecycleProcessor$CracDelegate.checkpointRestore(DefaultLifecycleProcessor.java:528) ~[spring-context-6.1.3.jar!/:6.1.3]
graalvm-1 | ... 17 common frames omitted
graalvm-1 | Suppressed: jdk.internal.crac.mirror.impl.CheckpointOpenSocketException: Socket[addr=postgres/192.168.247.3,port=5432,localport=36672]
graalvm-1 | at java.base/jdk.internal.crac.JDKSocketResourceBase.lambda$beforeCheckpoint$0(JDKSocketResourceBase.java:68) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore1(Core.java:169) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:286) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:265) ~[na:na]
graalvm-1 | at jdk.crac/jdk.crac.Core.checkpointRestore(Core.java:72) ~[jdk.crac:na]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
graalvm-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
graalvm-1 | at org.crac.Core$Compat.checkpointRestore(Core.java:141) ~[crac-1.4.0.jar!/:na]
graalvm-1 | ... 19 common frames omitted
graalvm-1 | Suppressed: jdk.internal.crac.mirror.impl.CheckpointOpenSocketException: Socket[addr=postgres/192.168.247.3,port=5432,localport=53216]
graalvm-1 | at java.base/jdk.internal.crac.JDKSocketResourceBase.lambda$beforeCheckpoint$0(JDKSocketResourceBase.java:68) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore1(Core.java:169) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:286) ~[na:na]
graalvm-1 | at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:265) ~[na:na]
graalvm-1 | at jdk.crac/jdk.crac.Core.checkpointRestore(Core.java:72) ~[jdk.crac:na]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
graalvm-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
graalvm-1 | at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
graalvm-1 | at org.crac.Core$Compat.checkpointRestore(Core.java:141) ~[crac-1.4.0.jar!/:na]
graalvm-1 | ... 19 common frames omitted
Repo: https://github.com/hoangphuc2k/graalvm-demo
Someone Can help me
I think the problem is related to socket. I did research https://github.com/CRaC/docs/blob/master/fd-policies.md but I still don't know how to configure it