Link Search Menu Expand Document

As of November 2020 (F20) and continuing into February 2021 (W21), developers working with Spring Boot and MongoDB on MacOS are running into this error when connecting to a MongoDB database:

2021-02-02 13:13:04.364  INFO 65733 --- [] org.mongodb.driver.cluster               : 
Exception in monitor thread while connecting to server

com.mongodb.MongoSocketWriteException: Exception sending message
	at com.mongodb.internal.connection.InternalStreamConnection.translateWriteException( ~[mongodb-driver-core-3.11.2.jar:na]
	... [ many stack frames omitted ]
  at java.base/ ~[na:na]
Caused by: extension (5) should not be presented in certificate_request
	at java.base/ ~[na:na]

The following work around seems to fix this:

  • Add the flag"-Djdk.tls.client.protocols=TLSv1.2" when running the mvn spring-boot:run command, like this:

    mvn spring-boot:run"-Djdk.tls.client.protocols=TLSv1.2"