You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Class loading fails on an interrupted thread causing com.mongodb.event.ServerClosedEvent to fail to load when Mongo detects a cluster change #38611
changed the title [-]Connectivity Issue with MongoDB "AWS DocumentDB" After Upgrading to Spring Boot 3.2.0 from 3.1.5 | 3.16[/-][+]Connectivity Issue with MongoDB "AWS DocumentDB" After Upgrading to Spring Boot 3.2.0 from 3.1.5 | 3.1.6[/+]on Nov 30, 2023
I can't see any code from Boot in the stacktrace, besides the JAR loader. I'm not sure if this has something to do with the Uber JAR rewrite. Can you please try with the classic loader implementation and report back if that fixes the issue?
@manjian14 The stack trace would suggest that the problem occurs when there's a change in the topology of the cluster but I haven't been able to reproduce it. Can you please provide a minimal sample and the steps to follow to cause the failure?
I've configured my application to connect to an AWS DocDB cluster using the standard driver configuration. Below is a snippet from my MongoDbConfiguration class:
In this setup, I've embedded the username and password within the cluster URL. The cluster has two replica sets, one for reading and one for writing. Additionally, the database is not accessible from outside; access is restricted either by whitelisted IP addresses or by project roles within the ECS cluster.
The AWS DocDB version is 5.0.0, the latest version as per AWS recommendations. The project is using Gradle version 8.5 and Java version 17. The base image is amazoncorretto:17-al2023-headful, and during the image build process, I've imported the SSL certificate using the keytool tool.
If you have any specific questions or if there's anything else you'd like to know, feel free to ask!
@manjian14 Is there any chance you could switch back to the DEFAULT loader implementation and try 3.2.1-SNAPSHOT? We've fixed a few bugs with the nested loader. I'm doubtful that we've caught this one, but I'd like to check since it seems hard for us to replicate the problem locally.
We've just pushed a fix for this. It would be much appreciated if someone could try the latest 3.2.1 SNAPSHOT with the default loader to see if we've fixed the problem.
@philwebb It's still failing with 3.2.1-SNAPSHOT. Was the last CI build completed successfully? It's orange, maybe the changes were not published/pushed, see
Gahh, those failures are a pain. It wasn't published but I also didn't get a notification. I've kicked it off again and I'll comment back here when it's done. Sorry about that.
@philwebb@wilkinsona I can confirm that for my two use cases, one being our internal application and the other the application I created on GitHub to reproduce the error, the issue seems to have disappeared with the use of the current Spring Boot 3.2.1-SNAPSHOT version.
Activity
[-]Connectivity Issue with MongoDB "AWS DocumentDB" After Upgrading to Spring Boot 3.2.0 from 3.1.5 | 3.16[/-][+]Connectivity Issue with MongoDB "AWS DocumentDB" After Upgrading to Spring Boot 3.2.0 from 3.1.5 | 3.1.6[/+]mhalbritter commentedon Nov 30, 2023
Hello!
I can't see any code from Boot in the stacktrace, besides the JAR loader. I'm not sure if this has something to do with the Uber JAR rewrite. Can you please try with the classic loader implementation and report back if that fixes the issue?
See here for details: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#nested-jar-support
manjian14 commentedon Nov 30, 2023
The connectivity issue with MongoDB "AWS DocumentDB" appears resolved after implementing the classic loader in Spring Boot 3.2.0:
Any additional insights or recommendations moving forward would be appreciated.
mhalbritter commentedon Nov 30, 2023
cc @philwebb
wilkinsona commentedon Dec 5, 2023
@manjian14 The stack trace would suggest that the problem occurs when there's a change in the topology of the cluster but I haven't been able to reproduce it. Can you please provide a minimal sample and the steps to follow to cause the failure?
manjian14 commentedon Dec 5, 2023
I've configured my application to connect to an AWS DocDB cluster using the standard driver configuration. Below is a snippet from my
MongoDbConfigurationclass:In this setup, I've embedded the username and password within the cluster URL. The cluster has two replica sets, one for reading and one for writing. Additionally, the database is not accessible from outside; access is restricted either by whitelisted IP addresses or by project roles within the ECS cluster.
The AWS DocDB version is 5.0.0, the latest version as per AWS recommendations. The project is using Gradle version 8.5 and Java version 17. The base image is amazoncorretto:17-al2023-headful, and during the image build process, I've imported the SSL certificate using the keytool tool.
If you have any specific questions or if there's anything else you'd like to know, feel free to ask!
philwebb commentedon Dec 5, 2023
@manjian14 Is there any chance you could switch back to the
DEFAULTloader implementation and try3.2.1-SNAPSHOT? We've fixed a few bugs with the nested loader. I'm doubtful that we've caught this one, but I'd like to check since it seems hard for us to replicate the problem locally.29 remaining items
philwebb commentedon Dec 7, 2023
We've just pushed a fix for this. It would be much appreciated if someone could try the latest 3.2.1 SNAPSHOT with the default loader to see if we've fixed the problem.
msievers commentedon Dec 7, 2023
@philwebb I'll give it a try and report back.
msievers commentedon Dec 7, 2023
@philwebb It's still failing with 3.2.1-SNAPSHOT. Was the last CI build completed successfully? It's orange, maybe the changes were not published/pushed, see
https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-3.2.x/jobs/build/builds/802
philwebb commentedon Dec 7, 2023
Gahh, those failures are a pain. It wasn't published but I also didn't get a notification. I've kicked it off again and I'll comment back here when it's done. Sorry about that.
philwebb commentedon Dec 8, 2023
Sorry @msievers, we're having some trouble with our CI right now and we haven't managed to publish jars yet.
wilkinsona commentedon Dec 9, 2023
@msievers Our CI's been fixed and a new snapshot 3.2.1-SNAPSHOT build has been published. Could you please give it a try if you have the time?
msievers commentedon Dec 11, 2023
@philwebb @wilkinsona I can confirm that for my two use cases, one being our internal application and the other the application I created on GitHub to reproduce the error, the issue seems to have disappeared with the use of the current Spring Boot 3.2.1-SNAPSHOT version.
wilkinsona commentedon Dec 11, 2023
Thank you, @msievers. That's some greatly appreciated good news.
spring-boot-3.2: loaderImplementation may not be needed after 3.2.1?
Retry read on ClosedByInterruptException
Fallback to RandomAccessFile on ClosedByInterruptException