Hello Team, I am trying to do CDC on MongoDB using...
# troubleshooting
a
Hello Team, I am trying to do CDC on MongoDB using the Dbezium Flink(V_18) Connector Below is the code where I am creating source to read cdc events across database.
Copy code
SourceFunctionString mongoSource =
        MongoDBSource.Stringbuilder()
                .hosts("host")
                .scheme("mongodb")
                .username("user")
                .password("password")
                .databaseList("test")
                .copyExisting(true)
                .deserializer(new JsonDebeziumDeserializationSchema())
                .build();
But I facing issues while connecting to mongodb where as I am able to connect with mongoDb from local machine, compaas as well spring boot applications. Not able to understand what is going wrong here? Is it because DNS resolution issue or there is something we need to at Atlas Side. Below is the error
Copy code
com.mongodb.MongoSocketOpenException: Exception opening socket
	at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70)
	at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:128)
	at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.net.SocketTimeoutException: connect timed out
Copy code
Caused by: com.mongodb.MongoConfigurationException: A TXT record is only permitted to contain the keys [authsource, replicaset],