MongoConfigurationException: Failed looking up SRV record
Issue
- Moving quarkus 2.7 + JDK11 JVM mode to quarkus 3.8.6.SP1 JDK21 JVM mode, the application fails to start with the following exception.
[vert.x-eventloop-thread-1] INFO org.mongodb.driver.cluster [!dt dt.entity.process_group=PROCESS_GROUP-ECC2ABC6D9C550A6, dt.trace_sampled=true, dt.trace_id=12d13076d66db65af23cd54799fbb7d9, dt.entity.host_group=HOST_GROUP-AA81E98B2AA19D51, dt.entity.process_group_instance=PROCESS_GROUP_INSTANCE-0A3D8B01927E75B8, dt.host_group.id=openshift-myid, dt.span_id=12cc8844f712ba57, dt.entity.host=HOST-AAC69AE34AC372FB]-No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=UNKNOWN, srvResolutionException=com.mongodb.MongoConfigurationException: Failed looking up SRV record for '_mongodb._tcp._mongodb._tcp.corelibrary-xxx.mongodb.net'., connectionMode=MULTIPLE, serverDescriptions=[]}. Waiting for 7000 ms before timing out
- The same application with quarkus 2.7 + JDK11 JVM mode deployed in the same cluster and namespace does not have the issue.
Environment
- Red Hat build of Quarkus
- mongodb-client
- mongo+srv protocol
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.