CheckpointOpenSocketException: Socket mariadb aws connection #33299
cristobalhermida opened this issue · 0 comments
cristobalhermida commented
spring-boot version: 3.3.1
spring version: 6.1.10
azul version: zulu22.30.13-ca-crac-jdk22.0.1-linux_x64
I am currently working on integrating CRaC support with Spring Boot 3.3.1, as detailed before.
During the checkpoint phase, I encountered an issue. It appears that the application's try to connect to mariadb in aws.
We have added mvn crac depenpendy
```
org.crac
crac
1.4.0
------
**We try to use on demand checkpoint and the errors occurs running this command**
docker exec -it 529fbf0be225 jcmd 129 JDK.checkpoint
**we get this exception**
An exception during a checkpoint operation:
jdk.internal.crac.mirror.CheckpointException
Suppressed: jdk.internal.crac.mirror.impl.CheckpointOpenSocketException: Socket[addr=**************.amazonaws.com/********,port=3306,localport=48524]
at java.base/jdk.internal.crac.JDKSocketResourceBase.lambda$beforeCheckpoint$0(JDKSocketResourceBase.java:68)
at java.base/jdk.internal.crac.mirror.Core.checkpointRestore1(Core.java:169)
at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:286)
at java.base/jdk.internal.crac.mirror.Core.checkpointRestoreInternal(Core.java:299)
Caused by: java.lang.Exception: This file descriptor was created by HikariPool-1 connection adder at epoch:1722520291505 here
at java.base/jdk.internal.crac.JDKFdResource.<init>(JDKFdResource.java:60)
at java.base/jdk.internal.crac.JDKSocketResourceBase.<init>(JDKSocketResourceBase.java:44)
at java.base/jdk.internal.crac.JDKSocketResource.<init>(JDKSocketResource.java:38)
at java.base/java.net.SocketImpl$1.<init>(SocketImpl.java:78)
at java.base/java.net.SocketImpl.<init>(SocketImpl.java:77)
at java.base/sun.nio.ch.NioSocketImpl.<init>(NioSocketImpl.java:139)
at java.base/java.net.SocketImpl.createPlatformSocketImpl(SocketImpl.java:54)
at java.base/java.net.Socket.createImpl(Socket.java:579)
at java.base/java.net.Socket.<init>(Socket.java:185)
at java.base/javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:261)
at org.mariadb.jdbc.client.impl.ConnectionHelper.standardSocket(ConnectionHelper.java:109)
at org.mariadb.jdbc.client.socket.impl.SocketUtility.lambda$getSocketHandler$0(SocketUtility.java:37)
at org.mariadb.jdbc.client.impl.ConnectionHelper.createSocket(ConnectionHelper.java:68)
at org.mariadb.jdbc.client.impl.ConnectionHelper.connectSocket(ConnectionHelper.java:127)
at org.mariadb.jdbc.client.impl.StandardClient.<init>(StandardClient.java:102)
at org.mariadb.jdbc.Driver.connect(Driver.java:69)
at org.mariadb.jdbc.Driver.connect(Driver.java:95)
at org.mariadb.jdbc.Driver.connect(Driver.java:26)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:137)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:360)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:202)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:461)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:724)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:703)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1570)
**but application console shows that logs -->**
[Attach Listener] jdk.crac: Starting checkpoint
[Attach Listener] o.s.b.j.HikariCheckpointRestoreLifecycle : Evicting Hikari connections
[Attach Listener] o.s.c.support.DefaultLifecycleProcessor : Restarting Spring-managed lifecycle beans after JVM restore
[Attach Listener] o.s.c.c.refresh.RefreshScopeLifecycle : Refreshing context on restart.
[Attach Listener] o.s.c.c.refresh.RefreshScopeLifecycle : Refreshed keys: []
[Attach Listener] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port 10000 (http)
[Attach Listener] o.s.c.support.DefaultLifecycleProcessor : Spring-managed lifecycle restart completed (restored JVM running for -1 ms)
[Attach Listener] o.s.c.support.DefaultLifecycleProcessor : Restarting Spring-managed lifecycle beans after JVM restore
As you can see, it shows the evictin hikari connections, so why it's still trying to connecto con database.
Thanks in advance