Hi All:
In project, I used the mongodb cluster repliset with nginx stream agent. because of it, there are 4 available hosts (xxxx:30000,xxxx:30001,xxxx2:60000,xxxx2:60001)
when the program started, the springboot mongodb will check all those available hosts automatic (on my bootstrap.yml there are nginx agent hosts only) , after found some of these were nginx agent host, springboot mongodb will remove all these agent host on its connect pool
but during on this, there is a exception throwed like this: at com.mongodb.internal.connection.DefaultConnectionPool$BackgroundMaintenanceManager.start(DefaultConnectionPool.java:1433)
I check this code, find this error was throwed due to when springboot mongodb try to remove nginx agent host from a ScheduledThreadPoolExecutor and find that executor was already terminated.
when I switch springboot version to 2.6.3, it works fine. all version after 2.6.4 will make this error. and when I used springboot 2.6.4 but with spring-boot-starter-data-mongodb 2.6.3, it will make this error also. so I think some synchronized lock changed on 2.6.4 and make it happened.
plz check it, thanks very much.
Comment From: bclozel
I don't think this is related to Spring Framework.
A couple of things might explain this change of behavior: * the mongodb driver upgrade from 4.4.1 to 4.4.2 (see spring-projects/spring-boot#29796) * the spring data upgrade from 2021.1.1 to 2021.1.2 (see spring-projects/spring-boot#29721)
While staying on Spring Boot 2.6.4, could you try rolling back those upgrades by overriding the version (see maven and gradle)?
When you're done confirming which upgrade is responsible for this change of behavior, please report it to the corresponding project with as much information as possible. A screenshot of a stacktrace is definitely not helping - a complete report in txt format or better, a sample application reproducing the problem is a better fit.
Comment From: Qingyu-Limitless
I got it, thanks very much
Comment From: chrgue
Hi @Qingyu-Limitless, could you explain how you fixed your problem?
Thanks in advance, Chris
Comment From: rook218
@Qingyu-Limitless I am also running into the same issue and would like to know how you closed this