What is best way to stop the connection retry in Java SDK 2.1.4

Hi @daschl

What is happening is that if the Host Ip is invalid say e.g. 192.1A68.1.10ASD or a non existing / reachable IP it closes OK .

But if the host IP is say 192.168.1.10 and this server does not have couchbase with query on it my program loops and retries connections.

One way to test it is to try to conenct to a data service only node

Here is my code

void runAction(){
    CouchbaseEnvironment env=null;
    Cluster cluster = null;
    Bucket bucket= null;
    try {

        // setup
        env = DefaultCouchbaseEnvironment
                .builder()
                .retryStrategy(FailFastRetryStrategy.INSTANCE)
                .build();

        cluster = CouchbaseCluster.create(env, hostFld.getValue().trim());
        bucket = cluster.openBucket(bucketFld.getValue().trim());

        String sql = editor.getValue().trim();
        runQuery(sql, bucket);

        env.shutdown();
        env=null;

    } catch (Exception e){
        LOGGER.error("Database Connection Error ");

        msgs.setValue(dateFormat.format(new Date())
                + "   Connection Error for  " + hostFld.getValue().trim()
                + "  " + bucketFld.getValue().trim());


        e.printStackTrace();


        bucket.close();
        cluster.disconnect();
        bucket=null;
        cluster=null;


    } finally {
        // close connections
        bucket.close();
        cluster.disconnect();
        bucket=null;
        cluster=null;


    }
    env=null;
    bucket=null;
    cluster=null;
}