SDK 2.7 to SDK 3.0 - Java

Hello,

Our project currently running with SDK2.7 and we have connection like below

private CouchbaseCluster getClusterInstance() {
if (cluster == null) {
cluster = CouchbaseCluster.create(dns);
}
return cluster;
}

Bucket loginBucket() {
getClusterInstance().authenticate(username, password);
return cluster.openBucket(bucketName);
}

our dns was in this format :- couchbase-app-env.svc.consul

The above one with SDK 2.7 working perfectly fine. Recently we were asked to upgrade to SDK 3.0 and made the necessary changes to the code. And our cluster connection also got updated like shown below
public @Bean Cluster getClusterInstance() {
if (cluster == null) {
cluster = Cluster.connect(dns, username, password);

    }
    return cluster;

}

But for when my app is getting started I get the below error

“message”:"[com.couchbase.core][DnsSrvLookupFailedEvent][130ms] DNS SRV lookup failed (name not found), trying to bootstrap from given hostname directly.",“context”

Note :- I am trying to connect the cloud same like 2.7 from my local (which works).

I checked couch documents related to this

But nothing so far helping. Does anyone faced this issue during their upgrade to java SDK 3.0

Thanks,

CC: @graham.pople

Found the issue. Anything more than 3.0.5 Java SDK couch client has this issue. If i have 3.0.3 and above no issues. Looks like something got changed from 3.0.6 version.

Hi @y2k1975
That message is nothing to worry about, it simply indicates that we tried DNS-SRV and are falling back to the ‘normal’ way of bootstrapping.

No for us from local during dev the tomcat server itself is not coming up. So we can’t run or debug our code during development time. Basically the cluster is null.